This project is read-only.

AJAX Sample 08 not able to replicate with Live data from SQL

Aug 2, 2013 at 12:45 AM
Edited Aug 2, 2013 at 12:45 AM

I have a Stream of LiveData coming every minute from a Machine which has (TagName, TagValue, TagTimeStamp) in a SQL Server table

I am trying to replicate the Sample 08 ( with Time on the X axis and Value on Y axis. I want to implement AJAX functionality.

However the below part of the code is unclear in "Sample 08"
// JSON Data Source
hcVendas.AjaxDataSource = new AJAXSource("./AJAXtest.aspx", 5000, false, false, true); // (source, delay, clearAll, onlyOnce, shift)

What does /AJAXTEST.aspx contain.

Till now I have written the following code
  hcVendas.Title = new Title("Live Random Data");
        hcVendas.Appearance = new Appearance() { renderTo = "container", zoomType = "x" };
        hcVendas.YAxis.Add(new YAxisItem { title = new Title("Value") });
        hcVendas.XAxis.Add(new XAxisItem { categories = ld.GetTagTimes().ToArray() }); 
        //// Calling ld.GetTagTimes function to get TagTimeStamp from SQL table
        hcVendas.Legend.enabled = false;
        hcVendas.Exporting.enabled = false;
         var series = new SerieCollection();
        series.Add(new Serie { name = "Random Data", type = RenderType.areaspline, data =ld.GetTagValues().ToArray() }); // Calling ld.GetTagValues function to get TagValue from SQL table
        hcVendas.PlotOptions = new PlotOptionsLine { dataLabels = new DataLabels { enabled = true } };

        hcVendas.DataSource = series;
The above code gives me a static congested graph. I would like to see 20 datapoints on the X axis (i.e 20 minutes of data) and then old data should scroll away as the table is generating new data