Hello,
I am working on evaluating WinCharts. I want to create a chart like a stock ticker. I am not sure how to create a chart where the data will be dynamically added. I have a created a timer tick, I know that works fine (i have used it for other charts).
THe problem I am having is with setting up the chart in such a way that we can add data points to the series every time period.
Is there a sample that I can look into? Could someone suggest a way to do this.
Thanks in advance
You can try looking at:
http://forums.infragistics.com/forums/p/10614/40649.aspx
After that if you still have questions feel free to ask.
Thanks Teodor. That helps.
The documentation I get with evals does not seem to be complete. So, I apologize for the seemingly simple questions.
How do I make the X axis scroll, such that a fixed number of data points is visible at any time.
Thanks
Teodor Taushanov"]There is no such built-in functionality. To achieve this you need to change the TickmarkInterval depending on your axis scale.
Are there any examples online/ in the forums that I could look into? Could you please provide more details?
You can try the following code:
private Random rnd;
{
InitializeComponent();
}
NumericTimeSeries series = new NumericTimeSeries();
this.ultraChart1.Series.Add(series);
this.ultraChart1.Axis.X.TickmarkStyle = Infragistics.UltraChart.Shared.Styles.AxisTickStyle.DataInterval;
timer1.Interval = 500;
timer1.Start();
series.Points.Add(dataPoint);
dateTime = dateTime.AddSeconds(1);
scale = Math.Min(1, scale);
Is this that you want?
That is exactly what I need. Thank you so much.
Is there any way I can do this with out the scroll bar?
When I do this, chart.Axis.X.ScrollScale.Visible = false;
The scrolling stops. Once again all the datapoints seem to be visible on the screen and that gives the crowded look and after a while, things slowdown (probably due to repainting the whole thing).
I need to display hundreds on little charts on one window. Each one is really small to start with. If I add the scroll bar and the X axis for the scroll bar, the display area for the chart is reduced tremendously. These charts run for hours together, so the data accumulates over time.
In this case probably is better just to use the last data values.
series.Points.RemoveAt(0);