PDA

View Full Version : (Beta 1) Suppressing Markers for Zero Values in a ScatterSeries



LEWJO10@ca.com
26 Dec 2011, 5:46 PM
Brendan,

On some of our charts we need to suppress markers in a ScatterSeries when the value is zero instead of showing the marker at zero along a vertical / horizontal axis.

One way I found for doing this was by using the code below.

ScatterSeries<DataItem> myScatterSeries = new ScatterSeries<DataItem>()
{
@Override
public void drawSeries()
{
super.drawSeries();
for (int i = 0; i < sprites.size(); i++)
{
if (myListStore.get(i).getDataProperty1() == 0)
sprites.get(i).setHidden(true);
else
sprites.get(i).setHidden(false);
}
}
};

Is there a better / recommended way?

Would it be possible to have a ScatterSeries Boolean option to set to indicate that the marker should be suppressed for zero value items?

Please let me know your thoughts.

Thanks,
John Lewis