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

Message ListMessage List     Post MessagePost Message

  issue with addScatterLayer when zooming in
Posted by Dong on Apr-09-2019 08:36
Attachments:
HI,

I am using version 6.0 with QT on win10. I take finance chart custom symbol as reference, because I want to draw k line with buy/sell signals.

But when I zoom in (referring to viewportcontroldemo), the signal angle is  placed at wrong place.

with code : "auto xArr = DoubleArray();
ScatterLayer *sellLayer = mainChart->addScatterLayer(xArr, DoubleArray(sellSignal,
cc.len), "Sell", Chart::ArrowShape(180, 1, 0.4, 0.4), 11, 0x9900cc);"


I tried to set xArr manually, and it does not work.  And seems that the addScatterLayer is sealed, I can not see the detail.

Is there a better way to fix it.
wrong pic.jpg

  Re: issue with addScatterLayer when zooming in
Posted by Peter Kwan on Apr-09-2019 15:06
Hi Dong,

In various zooming and scrolling sample code, the data arrays are subsetted to match the viewport, like:

DoubleArray viewPortTimeStamps = DoubleArray(m_timeStamps.data + startIndex, noOfPoints);

For your case, have you subsetted the sellSignal? There should be something similar to the "viewportSellSignal". If you do not subset the sellSignal, it will not match with your other subsetted data arrays.

Regards
Peter Kwan