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

Message ListMessage List     Post MessagePost Message

  Scatter XY points connected with line?
Posted by achar on Jan-11-2022 17:07
Hello,

I just bought the product and while browsing the sample code I cannot find an easy way to produce XY scatter data connected with a line, just like Excel. Do I have to manually add lines between points in the scatter plot? I do not want to miss something obvious here.

TIA

  Re: Scatter XY points connected with line?
Posted by Peter Kwan on Jan-11-2022 19:43
Hi achar,

The followings are some examples. (The followings are .NET examples. They are available in other programming language editions of ChartDirector as well.)

https://www.advsofteng.com/doc/cdnet.htm#multisymbolline.htm
https://www.advsofteng.com/doc/cdnet.htm#unevenpoints.htm
https://www.advsofteng.com/doc/cdnet.htm#multisymbolline.htm

In brief, the code is like:

LineLayer layer0 = c.addLineLayer2();
layer0.addDataSet(data0Y, 0xff0000, "Quantum Computer").setDataSymbol(
    Chart.GlassSphere2Shape, 11);
layer0.setXData(data0X);
layer0.setLineWidth(3);

Hope this can help.

Regards
Peter Kwan