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

Message ListMessage List     Post MessagePost Message

  XY chart highlight key point
Posted by charlie on Jan-14-2016 15:19
Attachments:
Hi!

I want to create a similar chart attached image.


Can someone help me?

Tks
chart_demo.png

  Re: XY chart highlight key point
Posted by System Administrator on Jan-15-2016 01:20
Hi charlie,

Yes. It is just a chart with a line layer plus a scatter layer. The line layer draws the blue
line with the blue dots. The scatter layer draws the red dots. The horizontal dash line can
be drawn using axis mark lines (Axis.addMark). I assume the solid horizontal and vertical
black line is the mouse cursor. You can draw this using the "Programmable Track Cursor".
There are a quite a number of "Programmable Track Cursor" examples included in
ChartDirector. If the solid horizontal and vertical black line is not the mouse cursor but is
just part of the chart, you can draw using axis mark lines too.

To begin, I suggest you start with the "Symbol Line Chart (2)" sample code to draw the
blue line with the blue dots first. Then you can use Axis.addMark to add the horizontal
mark lines (see the "Marks and Zones" sample code for an example of how to use
Axis.addMark). The line style can be set to a "dash line" by using a "DashLineColor" as the
line color (see BaseChart.dashLineColor). To draw the red dots, first create the x and y
coordinate arrays for the red points, then add a scatter layer using
XYChart.addScatterLayer.

Hope this can help.

Regards
Peter Kwan