ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Ask about how to draw graphs non-continuously in surface charts.
Posted by kwon on Feb-24-2021 14:19
Attachments:
Hi !!
I bought ChartDirect and am using it well.
Draw a non-continuous graph for drawing SurfaceChart.
As shown in the attached picture.

I used addDataSet function in XYChart, but I don't know what to do in SurfaceChart.
Please let me know if there is any way.

Thank you.
graph.jpg

  Re: Ask about how to draw graphs non-continuously in surface charts.
Posted by Peter Kwan on Feb-25-2021 01:27
Hi kwon,

Unluckily, the Surface Chart does not support a gap or a "hole" in it. The equivalent of the Surface Chart in 2D is the "Contour Chart" (the "Contour Layer" in XYChart). Even in XYChart, the Contour Layer cannot have a hole or gap in it. For both the Contour Layer and the Surface Chart, the input are some points, and the chart will fill all the empty space among the points to form a complete surface.

For your particular case, it is possible to create the chart you need by merging two surface chart. Basically, you create two separate surface charts. The first chart only includes the left part of the surface. The second chart includes the right part of the surface but does not have the plot region walls or axes or anything else. (The walls are set to be hidden.) You can then merge the two charts together to get what you want.

The following is an example of a chart created by merging two surface charts.

https://www.chartdir.com/forum/download_thread.php?bn=chartdir_support&thread=1553840180

The two charts must be created using the same plot region size, view angles and and axis scales. The code to merge the chart is (in C++):

chart1->makeChart()->merge(chart2->makeChart(), 0, 0, Chart::TopLeft, 0);

Merging only works if the two surfaces do not overlap each others. If they overlap, then your code would have to determine which surface should be at the bottom, and which surface at the top, and merge them in the proper order. In 3D, it is possible for the surfaces to mutually overlap or intersect each others, in which case the merge method would not work. (For your case, it seems the surface cannot mutually overlap or intersect, so merging should work.)

Regards
Peter Kwan