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... )
Wrong axis in the marks
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi --
Try: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.
Code: Select all
tChart1.Series[0].Marks.Style = Steema.TeeChart.Styles.MarksStyles.Value;
How about: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... )
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));
}
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/