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

Message ListMessage List     Post MessagePost Message

  3D Scatter Chart with 'flying cubus'
Posted by Daniel-san on Jan-28-2019 21:07
Hello,

doing some experimenting with this library, I came across the following issue:
Plotting vector data in a 3D scatter chart, I was wondering, if there is kind of a chance to place kind of a simple building inside the 3d chart? (its contours would be appropriate as well). I need a possibility to draw lines inside the cube, the marker lines begin at the axis, not 10 points away (for example).
Example:
Draw a line from (8/4/4) to (8/7/7).

Is there any chance or future feature handling this issue?

Greetings

  Re: 3D Scatter Chart with 'flying cubus'
Posted by Peter Kwan on Jan-29-2019 00:58
Hi Daniel-san,

You can draw a line joining two points as follows: (As I am not sure which programming language you are using, I will use C#/Java below.)

ThreeDScatterChart c = new ThreeDScatterChart(.....);
c.setPlotRegion(...............);

// If you have call ThreeDScatterChart.addScatterGroup to add data to the
// chart, ChartDirector will auto-scale the x, y and z axis to fit your data.
// If you have not add any data to the chart, you would need to use
// Axis.setLinearScale to configure the axis scale
.......


DrawArea d = c.makeChart3();

int pixelX1 = c.getXCoor(8, 4, 4);
int pixelY1 = c.getYCoor(8, 4, 4);

int pixelX2 = c.getXCoor(8, 7, 7);
int pixelY2 = c.getYCoor(8, 7, 7);

d.line(pixelX1, pixelY1, pixelX2, pixelY2, lineColor, lineWidth);


.....


You can use multiple DrawArea.line to draw multiple lines. Note that the lines are drawn in the same order that you call DrawArea.line. In case two lines intersects, the line that is drawn last will be on top of the line that is drawn first. (The ordering of the lines will be important only if the colors of the lines are different.)

Hope this can help.

Regards
Peter Kwan

  Re: 3D Scatter Chart with 'flying cubus'
Posted by Daniel-san on Jan-29-2019 15:08
Hello Mr. Kwan,

this indeed helped us A LOT! This is a tremendous library, I wouldn't have expected such a feature within a chart, thanks very much.

Greetings,
Daniel-san