Forum Discussion
Anonymous
2 years agoNot applicable
Synchronize color palette between Custom & Native visuals
Hi everyone, I'm requesting your help. I'm currently developping a custom visual using Plotly.JS library. Basically, it's a line chart but with a few more customized features. My aim is to fi...
DallasBaba
2 years agoSkilled Sharer
Anonymous you can try the following steps:
- Use the IVisualHost interface to get the color palette for the native line chart visual.
- Use the same color palette in your custom visual by setting the colorPalette property of the IVisualHost interface to the color palette obtained in step 1.
- Use the getColor method of the colorPalette service to get the color for each category in your custom visual.
This should ensure that the colors are consistent between the native line chart visual and your custom visual, even when filtering with slicers.
Let me know if this works for you. @ me in replies, or I'll lose your thread!!!
Note:
Note:
If this post is helpful, please mark it as the solution to help others find it easily. Also, if my answers contribute to a solution, show your appreciation by giving it a thumbs up!