From this bar chart on staff allocation I want to know what is the preceding activity for D and E in order to draw activity on arrpw diafram ? Is it B or both B and C ?
The activity on arrow diagram shows the precedence in terms of dependencies: X->Y means that delays in finishing X would also delay Y.
Unfortunately, your bar chart alone does not allow to say anything about precedence. You can only guess. For example, can you say for sure that a delay on B would delay D ? D could be totally unrelated from B. Maybe B is only needed for some other later task like for example G.
Your picture says that you have a second table with resource allocation to tasks. If this is a 100% allocation, you could then determine a resource dependency, by linking the tasks of a same resource in sequence. Why? Because the person is allocated 100% to a task means that she can do only one thing at a time, and the delay on one thing would automatically delay the next thing that she has to do, even if these things a logically unrelated.
Last but not least: this kind of reasoning is good for exercises, not for real life. In RL you should only create an arrow between two logically dependent nodes (i.e the result of X is required before starting Y). Because you could add resources to your project or reallocate tasks, so that resource related dependencies might evolve quickly.