Pre loader

DataLabels Show and Hide Dynamically

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



Is it possible to toggle the DataLabels dynamically in the chart? Setting some values to true or false like isVisible property.

  • You must to post comments
Best Answer

Yes it is, see this related question. This shows how to show and hide datalabels on an individual basis by setting a flag {showLabel: true} on the metadata.

If you would like to enable/disable ALL datalabels (turn them all on or off) this can be done simply by setting = 0. Removing the style should also hide the labels, setting it should add them back. I will notify the team that we should make this easier by providing a dataLabelProvider.isEnabled or isVisible property in future builds.

Does that help?

Best regards,

  • You must to post comments

Thanks Andrew..

I cannot use meta data for this. In my application what i am planning is like i am having a chart and properties window. From properties window need to hide and show the dataLabels. So its difficult to iterate the all data objects and show and hide the dataLabels. But fontSize 0 will work for me.

  • Andrew Burnett-Thompson
    Of course – I misunderstood your question initially – thinking you wanted to show/hide specific data labels. To show hide all fontSize: 0 will work, so will removing the fontFamily or style on the dataLabelprovider. I agree we need an isEnabled flag to toggle all the labels, so I’ve created a task for it in future builds (SCJS-1604). Thanks!
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies