Hi,
I am Manoj and working using chartdirector for creating graphs and charts for my application.
I am facing issues with Scatter charts.
I am able to create the Scatter chart but it seems that the datapoints are not mapped correctly in the charts.
My requirement is i need my x-axis to be fixed from -30 to +30 range and wants my dataX1 and dataY1 to be plotted on the chart.
I am doing with below steps.
double[] dataX1 = {-6, -12, -4, -3, 7, 8, 9, 10, 12, 11, 8, 20, 25, 30, -3, -10};
double[] dataY1 = {65, 80, 40, 45, 70, 80, 80, 90, 100, 105, 60, 20, 32, 56, 76, 5};
string[] XAxisArray ={-30, -29, .......... , 29, 30};
XYChart c = new XYChart(800, 270, 0xE1FAE9, 0, 0);
c.setRoundedFrame();
c.setPlotArea(30, 20, 700, 210, 0x62F590, 0x62F590, 0xE1FAE9, 0x62F590);
c.yAxis().setLinearScale(0, 110, 10);
c.xAxis().setLinearScale(-30, 30, XAxisArray);
ScatterLayer scLayer = c.addScatterLayer(dataX1, dataY1, "data", Chart.CircleSymbol, 7, 4,0);
scLayer.setXData(-30, 30);
please let me know what steps i am missing as not able to mapped the charts with points being plotted ?
Thanks,
Manoj Kumar |