Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Change chart colors with button
xpaterna
Hi,
I have a bar chart. This charte always have 4 bars. We can call the bars: barA, barB, barC and barD.
I want to put 4 html buttons btnA, btnB, btnC and btnD. When I click in btnA I want to change the color of barA to yellow for example. When I click in btnB I want to restore the original color of barA and change the color of barB to yellow, etc.
I don't know how to do that, is any way to do that without reload all the report?
Thanks and sorry for my english.
Find more posts tagged with
Comments
johnw
This is a bit tricky. You would need to render a different chart for every combination of colors, and use some Javascript to do the old fashion HTML show/hide on each chart based on what button combination is pushed. Thats the only way to do it without reloading the whole report. The only other option is to create some sort of Webservice that delivers rendered charts, and you pass in the button combinations.
xpaterna
Hi John!
Finally I draw 5 charts, one without any highlighted column, and the four others highlighting every column.
Then I made 4 html buttons that changes the visibility of the charts depending the button I clicked.
It works perfectly.
Thank you very much!