Pre loader

SciChartJS - specify colour of LegendModifier

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums


I am adding a LegendModifier to display legends for my chart as below:

_sciChartSurface.chartModifiers.add(new SciChart.LegendModifier({ showCheckboxes: true }));

My legend currently looks like the below, with very poor legend visibility:

![enter image description here][1]

I want to know how to set this legend to be opaque so that the labels may be seen clearly. What would be event better would be to just have a constant class for my legend collection (perhaps .sciChartLegendsContainer or whatever) so that I can apply my own css styling myself, without having to hack around with javascript.

  • You must to post comments
Best Answer

Hello Malcolm,

As of now you can set a custom lagend background as such:

sciChartSurface.themeProvider.legendBackgroundBrush = "red";  

Also, we have a task in our backlog to allow easier styling using CSS:

Best Regards,

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.