Creating percentile-lines in histograms, hiding x-markers
Posted: Thu Feb 28, 2008 11:57 am
Hi. This is a technical detail question:
I have a Histogram, and onto this I want to add some percentile-lines (plines), say 10, 50 and 90. Thus, I am creating 3 thin bars in separate series and adding each series onto the chart in the following manner:
The problem is that the x-axis of the new series overrides my current. This means that I get only 1 internal gridline on the x-axis, and only one tick on it; displaying the x-value of the latter of the 3 added series.
So, quick question; is there any way I can add a Series whithout displaying its x-axis? Or alternatively, add a series but without affecting the current x-axis?
I try to set the Bars' horizontal axis to the existing one but with no luck.
Also, if there are methods in the API for displaying percentiles which I have overlooked I am grateful for hints on this
Thanks a million in advance,
Marius
I have a Histogram, and onto this I want to add some percentile-lines (plines), say 10, 50 and 90. Thus, I am creating 3 thin bars in separate series and adding each series onto the chart in the following manner:
Code: Select all
Looping this 3 times:
com.steema.teechart.styles.Bar pLine = new com.steema.teechart.styles.Bar();
pLine.add(histogram.getMaxYValue());
va[0] = value;
pLine.getXValues().value = va;
pLine.setColor(histogram.getColor());
pLine.getPoint(0).setLabel(String.valueOf(value));
pLine.setBarWidthPercent(5);
pLine.getBrush().setStyle(com.steema.teechart.drawing.HatchStyle.PERCENT90);
pLine.setShowInLegend(false);
pLine.setCustomHorizAxis(getHistogramPanel().getXAxis());
getHistogramPanel().getTChart().getChart().addSeries(pLine);
So, quick question; is there any way I can add a Series whithout displaying its x-axis? Or alternatively, add a series but without affecting the current x-axis?
I try to set the Bars' horizontal axis to the existing one but with no luck.
Also, if there are methods in the API for displaying percentiles which I have overlooked I am grateful for hints on this
Thanks a million in advance,
Marius