|
Novalue on Contour chart |
Posted by Stanley on Sep-03-2015 17:09 |
|
Hello,
I used NoValue constant to my contour plot which has donut like data area. ( refer to attached image please.)
In this case, outside NoValue area is plotted as expected. But inner circle area with NoValue data is plotted like zero value.
How can I fix it? Would you help me?
Regards,
Stanley |
Re: Novalue on Contour chart |
Posted by Stanley on Sep-03-2015 17:14 |
|
I missed image file on main post. So attached here.
Stanley
|
Re: Novalue on Contour chart |
Posted by Peter Kwan on Sep-04-2015 04:37 |
|
Hi Stanley,
In ChartDirector, using NoValue means the data points does not exist. For the remaining
points, which can be randomly scattered, ChartDirector will fill the region within the
"boundary" of the points, in wihch the boundary is the "convex hull" of the points.
If you remove some points on the boundary (the outside points), it changes the boundary,
so the shape will change. If you remove some points inside the boundary, it would not
affect the boundary. It will only change the fill colors inside the boundary.
For your case, if you would like to create a "hole" at the center, one method is to draw a
white circle over the contour layer. An example is like:
//Add a white circle at the center
c.addScatterLayer(new double[] { 0 }, new double[] { 0 }, "", Chart.CircleShape, 1,
0xffffff, 0xffffff).setSymbolScale(new double[] { 100 }, Chart.XAxisScale, new double[] {
100 }, Chart.YAxisScale);
//Add a contour layer using the given data
ContourLayer layer = c.addContourLayer(dataX, dataY, dataZ);
Hope this can help.
Regards
Peter Kwan |
|