Calculation and Automatic Scale without Null Values
Posted: Wed Jul 02, 2008 2:13 pm
Hello,
i have problems with NullValues. To draw gaps within some Lines i musst add one point with Color.Transparent and an y-value. This value is recognized by TChart although its not really an value. Its an dummy value for drawing the gap. Now, the problems were the automatic scale of TChart with one of this DummyValue at the end and of course within the calculation of the SeriesStats.
Some example code:
In this sample, the average must be 3, but the Stats (and i think a averagefunction too) calculates 2.25. Also the TChart scale automatic choose as minxvalue 0 and maxvalue 9, so the view is very bad
A change of the TreatNulls property effects only the draw of the line and doesnt help me.
I hope you know what i mean and can give me a workaround or an solution for it.
Thanks in advance!
i have problems with NullValues. To draw gaps within some Lines i musst add one point with Color.Transparent and an y-value. This value is recognized by TChart although its not really an value. Its an dummy value for drawing the gap. Now, the problems were the automatic scale of TChart with one of this DummyValue at the end and of course within the calculation of the SeriesStats.
Some example code:
Code: Select all
Steema.TeeChart.Styles.FastLine line = new Steema.TeeChart.Styles.FastLine();
line.TreatNulls = Steema.TeeChart.Styles.TreatNullsStyle.DoNotPaint;
line.Add(1,2);
line.Add(2,6);
line.Add(3,1);
line.Add(9,0, Color.Transparent);
tChart1.Series.Add(line);
A change of the TreatNulls property effects only the draw of the line and doesnt help me.
I hope you know what i mean and can give me a workaround or an solution for it.
Thanks in advance!