This project is read-only.

Line Graph Value Errors

Mar 8, 2011 at 2:44 PM

This may be a similar problem to the one that darksied posted, but I want to plot a simple line graph to get started. I'm using silverlight 4 and my code is

            double[] x = new double[2];
            double[] y = new double[2];
            x[0] = 0;
            y[0] = 0;
            x[1] = 10;
            y[1] = 10;

            EnumerableDataSource<double> xs = new EnumerableDataSource<double>(x);
            EnumerableDataSource<double> ys = new EnumerableDataSource<double>(y);

            xs.SetXMapping(_x => _x);
            ys.SetYMapping(_y => _y);
            CompositeDataSource ds = new CompositeDataSource(xs, ys);
            graph = new LineGraph(ds, "Current Calibration");
            graph.LineThickness = 1;
            graph.LineColor = Colors.Red;

The problem is the line gets plotted from 0,0.6 to 9.4,10, is there something I'm missing

Mar 9, 2011 at 2:41 PM

What version are you using?

Mar 9, 2011 at 3:29 PM

The dll is the one that came in V0.2 silverlight binary download, the dll version is V1.0.0.0 and I'm using silverlight 4 in web developer express 2010, is that all the information you need ?

Mar 9, 2011 at 7:22 PM

In 0.3.4703.0 there is no constructor for LineGraph that takes two parameters. I've never used D3 with Silverlight, though. So, I'm not sure what's going on here.

Mar 11, 2011 at 9:16 AM

I'm not really a software engineer so kicked the code around a bit with no success, then went to look at the example line graph on the home page and assuming the code is the same as the source code download and plots x values from -5 to +5, I see the same problem. Do other people see this or is it something intrinsic to my PC.

Jul 27, 2011 at 8:18 PM

Yeah, i got the SAME problem too.

Could any one can see to fix this?