This project is read-only.

How to set a ColorMap

Aug 7, 2014 at 4:11 PM
Edited Aug 7, 2014 at 4:16 PM
Hi guys, I downloaded the latest version of D3 sources (07/2013) and i builded all the DLL. I'm trying to use a ColorMap in a WPF C# project.

In XAML i created an empty ChartPlotte with name "plotter" and i need to insert a ColorMap.
Here it is my C# code:
            ColorMap cm = new ColorMap();
            int N = 5;

            double[,] altezza = new double[N, N];
            Point[,] punti = new Point[N, N];

            Random random = new Random();
            for (int i = 0; i < N; i++)
                for (int j = 0; j < N; j++)
                    altezza[i, j] = 10 * random.Next(0, 10);
                    Point p = new Point(i, j);
                    punti[i, j] = p;

            WarpedDataSource2D<double> dataSource = new WarpedDataSource2D<double>(altezza, punti);

            cm.DataSource = dataSource;

In Debugging I can see the ColorMap object into the plotter object with the right datasource but the graph the comes out in the window is empty. Am i missing something?

The plotter is good becuse if I try to insert another type of chart everything function as expected.

P.S: The ColorMap example distributed with the sources also stay empty.