This project is read-only.

Problem with mapping in D3 Silverlight v2

Oct 21, 2010 at 3:03 PM
Edited Oct 21, 2010 at 3:03 PM

Hi Guys,

 

nice work I've seen so far but like many others I am struggling with the poor documentation.

 

I am trying to use a queue as LineSeries data source and I am am somehow not able to get the mapping right,

-----------------------------------------------------------------------------------------------------------------

 

public Stack data = new Stack(1000);

// Let's say data is already filled with 1000 Point objects
double count = 0;
            for (int i = 0; i < 1000 - 1; i++)
            {
                data.Push(new Point(count, count));
                count++;
            }

// Do some spcific graph formatting
LineGraph line = axes.createComplexGraph(plotter, "Example");

// Let's get to the point
EnumerableDataSource> dataSource = new EnumerableDataSource>(data);
dataSource.SetXYMapping(?);

---------------------------------------------------------------------------

The idea behind this is to have be able to update the chart data on the fly by pushing new values in and let the oldest ones pop out.

Thx in advance for help!