Page 1 of 1
Wrong axis in the marks
Posted: Thu Aug 19, 2004 2:25 pm
by 6923391
1) My x-axis consists of strings and my y axis of doubles. When I turn on the visibility of the marks, they contain the string labels in the X-axis instead of the value on the y-axis.
2) The values in the Y-axis have up to 3 decimals. Can I reduce the value shown in the markes to one decimal, without changing the value of the actual point in the chart? (I hope you figure out what I mean...
)
Posted: Fri Aug 20, 2004 11:31 am
by Chris
Hi --
1) My x-axis consists of strings and my y axis of doubles. When I turn on the visibility of the marks, they contain the string labels in the X-axis instead of the value on the y-axis.
Try:
Code: Select all
tChart1.Series[0].Marks.Style = Steema.TeeChart.Styles.MarksStyles.Value;
2) The values in the Y-axis have up to 3 decimals. Can I reduce the value shown in the markes to one decimal, without changing the value of the actual point in the chart? (I hope you figure out what I mean... )
How about:
Code: Select all
private void Form1_Load(object sender, System.EventArgs e) {
Random rnd = new Random();
for(int i=0;i<10;++i) {
line1.Add(Convert.ToDouble(i), rnd.NextDouble() / 3, Convert.ToChar(65 + i).ToString());
}
line1.ValueFormat = "";
line1.Marks.Visible = true;
line1.Marks.Style = Steema.TeeChart.Styles.MarksStyles.Value;
}
private void line1_GetSeriesMark(Steema.TeeChart.Styles.Series series, Steema.TeeChart.Styles.GetSeriesMarkEventArgs e) {
e.MarkText = Convert.ToString(Math.Round(Convert.ToDouble(e.MarkText), 3));
}
Posted: Fri Aug 20, 2004 1:00 pm
by 6923391
Worked perfect!