on 01-30-2015 9:21 PM
Hi All,
i have a chart in which i have 5 different key figures. I have 5 different check boxes which either show or hide each of the one above. i have assigned colors as below. i used setDataSelection() to switch kFs
KF1: red
KF2:blue
KF3:green
KF4:orange
Kf5:grey
Issue: The chart colors are applied in the same order no matter what KFs are selected to display. For ex if i select to display KF3 and KF4 they are showing up with red and blue respectively instead of green and orange.
Please give me your inputs on how to configure the charts to avoid above situation.
Thanks,
Hi Karthik,
If u want to change the color of the bar chart when selecting the check boxes then u should use custom css to change the colors.
.customChart1 g.v-column g.v-datashape:nth-child(1) rect.v-datapoint.v-morphable-datapoint {fill: yellow}
.customChart1 g.v-legend-content g.v-row.ID_0 path {fill: yellow;}
use this code, create a separate class for each color (here custom Chart1 is the class name for yellow color )in the CSS and while clicking on the checkbox use the setcss function to call the specific class. i have already tested this its working fine.
Regards,
Bala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Bala,
thanks for the suggestion.
I have the scenario where the selection of checkboxes is not exclusive. That means the user can check all the check boxes or a combination or none. In that case how do i set multiple CSS classes for the same chart or can I assign multiple CSS classes fot the same chart? also i have five different measures in the LINE chart how would i distinguish the CSS classes based on them ?
Thanks,
karthik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.