It's possible to add redirecting URL's to other Visual Force Pages by clicking on the chart bars?How can I do that? Thank you.


You can add "<a>" html element inside <apex:chart> tag and make it invisible. You will probably need some CSS style to place the html element wherever you want. See attached screenshots.

Hope this will help you.

VF Page

VF page

Result Result

  • Thank you very much. Yes, it helps. The problem is that, if you want to cover only one bar(for example) with the <a> element and use it in several bars, you have to put it by a fixed-way. If you open a sub-menu on the left, the <a> mismatch its bar. I'm searching a way that all covered area of the bar (or peace of pie chart, whatelse) could have a redirecting link to another URL, dynamically. But i'm not sure that could be possible. Apr 5 '16 at 16:47
  • You can use JavaScript tricks to solve your problem. Use firebug to find it out. Also, you can add "onclick" attribute to "<div>" element that renders <apex:chart node. Apr 5 '16 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.