|
setLinearScale does not work on SurfaceChart |
Posted by Pavel on Jan-19-2012 14:21 |
|
Hello,
I'm implementing zoom in 3D SurfaceChart and cuddenly noticed that setLinearScale on X an
Y axises makes SurfaceChart disappear in draw area. Is it bug or I do something wrong?
Platform:
.NET 3.5, windows forms
Source Code:
SurfaceChart c = new SurfaceChart(cWidth, cHeight, cColorBack, cColorBorder);
c.setPlotRegion(cWidthHalf, cHeightHalf, cSize3dHalf, cSize3dHalf, cSize3dHalf);
// NEXT TWO LINES MAKE CHART DISAPPEAR!
c.xAxis().setLinearScale(m_DataXmin, m_DataXmax);
c.yAxis().setLinearScale(m_DataYmin, m_DataYmax);
// Set the data to use to plot the chart
c.setData(m_DataY, m_DataX, m_DataZ);
// Output the chart
m_ChartViewer.Chart = c;
Thanks in advance,
Pavel |
Re: setLinearScale does not work on SurfaceChart |
Posted by Peter Kwan on Jan-19-2012 23:29 |
|
Hi Pavel,
For a 3D surface chart, ChartDirector will only consider data points within the axis scale, and not data points outside the axis scale. ChartDirector then use these data points to plot the surface chart. One possible reason that nothing is plotted is that there is no data points within the axis scale you specified. Is it possible to check if there are really data points within your axis scale?
If the above still does not solve the problem, is it possible to provide a complete sample code to using hard coded data to illustrate the problem? (Without seeing the actual data and parameters you are using, it is hard to diagnose the problem.) For example, you may use the "Surface Chart (1)" sample code, and add the setLinearScale lines to see if you can reproduce the problem.
Regards
Peter Kwan |
Re: setLinearScale does not work on SurfaceChart |
Posted by Pavel on Jan-20-2012 12:12 |
|
Peter,
Thanks a lot. I tried scaling in the sample and it works fine. It was data issue.
Sorry for misunderstanding,
Pavel |
|