Sample demonstrates how to mark specific points dynamically through CSS

Article ID: 2291
Last updated: 29 May, 2018
Article ID: 2291
Last updated: 29 May, 2018
Revision: 3
Views: 491
Posted: 18 Jun, 2010
by Dean J.
Updated: 29 May, 2018
by Gargani A.

Question

How to mark specific points dynamically through css?

Answer

This sample demonstrates how to mark specific points dynamically through CSS.

In the style-sheet, write a rule that compares the x-value of a point with the value of the target property:

point['@}@x-@myProperty'==0] { marker: DIAMOND; }

At runtime, to highlight a certain point, set the property on the dataset. The property's value being the x-value of the highlighted point. For example, to highlight the point with x=2 of the first dataset:

dataSource.getDataSet(0).putProperty("myProperty", new Double(2),true);

Make sure the chart's dynamicStyling property is set to true (this is the default value). This will ensure that the display will be updated each time the property is changed.

Download Sample sample.zip


Refer to the codefragments/chart/rendering-hint sample for way to display specific data points with marker without using CSS.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 2291
Last updated: 29 May, 2018
Revision: 3
Views: 491
Posted: 18 Jun, 2010 by Dean J.
Updated: 29 May, 2018 by Gargani A.
Also listed in


Others in this category