ChartDirector Support Forum Home   Search
Can this be done ?
Posted by icm63 on Oct-19-2018 03:39
Attachments:
I have done a single point scatter chart?

But can a multi point scatter chart showing a tail to current point, can this be done?

If so how?

Re: Can this be done ?
Posted by Peter Kwan on Oct-19-2018 13:45
Hi icm63,

I think the "tail" can be drawn as a normal line layer, using small circles as the data symbol. You can add another scatter layer with the end points which shows the larger circle.

Regards
Peter Kwan

Re: Can this be done ?
Posted by icm63 on Oct-20-2018 07:01
A linelayer is a number() for a time series().

A scatter layer does not use a time series.

X1 maybe a change of a moving average

Y1 maybe a change of price.

X1 and Y1 are not time series.

So how can a Linelayer work with the above a example to draw the tail.

Re: Can this be done ?
Posted by icm63 on Oct-24-2018 00:10
I can draw the symbol at the end of the arrow "most recent". That is a scatter layer with two points from two different data series.

The LINE TAIL (to the most recent dot) is the challenge? How to do this ? I can lots of dots the same way as the you draw the 'most recent' symbol, but how does one draw the line (before the .layout call)

NOTE: I am not interested in the small dots within the tail

Re: Can this be done ?
Posted by Peter Kwan on Oct-25-2018 21:45
Hi icm63,

Suppose points on your line is:

Dim x() As Double = { 1.4, 2.9, 2.8, 2.6, 2.0 }
Dim y() As Double = { 1, 2, 3, 7.1, 5 }

You can:

'Draw the symbol for the "most recent value"
c.addScatterLayer(New Double() { x(UBound(x)) }, new Double() { y(UBound(y)) }, .....)

'Draw the "tail"
Dim myLayer As LineLayer = c.addLineLayer(y, myColor)
Call myLayer.setLineWidth(2)
Call myLayer.setXData(x)

In summary, the tail is just a line and can be drawn with a LineLayer.

Hope this can help.

Regards
Peter Kwan

Re: Can this be done ?
Posted by icm63 on Oct-26-2018 02:12
Thanks, Looks like a can do!

Re: Can this be done ?
Posted by icm63 on Oct-29-2018 02:11
Attachments:
So far so good.

Having trouble with Image Map for cursor over line tool

This code

WebChartViewer1.Image = mainXYChart.makeWebImage(Chart.PNG)

WebChartViewer1.ImageMap = mainXYChart.getHTMLImageMap("", "", _
"title='Symbol: {dataSetName}, Axis: X = {x|p}, Y = {y|p}'")

But the Y = {y|p} data is only showing error '{y|p}' when cursor over AAPL line

This works fine:  X = {x|p}.

Any ideas, see source out put behind browser page chart below

Re: Can this be done ?
Posted by Peter Kwan on Oct-30-2018 01:44
Hi icm63,

If the data representation has only one y-value, it is simply referred to as "value". If the data representation has multiple y-values (such as a OHLC bar symbol), they may be referred to by using different names depending on the symbol type. You may refer to our sample code the examples.

So for your case, it should be "{value|p}".

Hope this can help.

Regards
Peter Kwan