I am plotting points in a line chart continuously, reading data from a device every second. This may go upto an hour or more.
i.e, plotting almost 3600 points every hour . The elapsed time/sample number is displayed in the X-Axis label.
After a few minutes of plotting, the X-Axis labels disappear. this is because there is no more space to display them.
I do not want to use the scroll bar and scaling.
Is it possible to modify label display at runtime ? For example, if I have a chart display area equivalent to the size of this Text box, then to start with I will display all sample numbers/elapsed time [vertically] like 1 2 3 5 6 ....
After sometime, based on the lenght of X Axis, when some number of points have been plotted, then I will start displaying only selected labels like: 1 5 10 15 20 ......
Again after some number of points are plotted, I will change to 1 10 20 30 40 ....
and then 1 20 40 ..... like this....
Is there a way to do this?
It's little hard to reproduce this problem. Which version of our chart are you using?
I've also tried this:
public partial class Form1 : Form
{
InitializeComponent();
}
series.Points.Add(dataPoint);
this.ultraChart1.ScatterChart.ConnectWithLines = true;
this.ultraChart1.ScatterChart.IconSize = Infragistics.UltraChart.Shared.Styles.SymbolIconSize.Small;
int count = series.Points.Count;
and when new points are added the x-axis labels are recalculated automatically. If this still doesn't help, could you send us your code so we can investigate the problem?
I tried that. I think we are only hiding few labels when we specify TickMarkInterval.
Because same output is observed after plotting some points. The labels that are displayed based on the Interval specified, start becoming blur [ truncated top and bottom when drawn vertically] and after some more point they vanish.
Is there a way to clear all labels and redr aw labels ?
You can try using Scatter chart for this. I've tried:
table.Columns.Add("a", typeof(string));
table.Columns.Add("Y", typeof(int));
table.Rows.Add(new object[ { "b", 20, 10 });
this.ultraChart1.DataSource = table;
this.ultraChart1.DataBind();
In this case when you want to change the interval that the labels are displayed you can just put:
this.ultraChart1.Axis.X.TickmarkInterval = 10;