Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
920
WinChart Demarcation lines and scrolling
posted

Hi

I've added two vertical demarcation lines to a line chart with the FillSceneGraph event.  I have two problems.

The first is using CInt(axisX.Map(target)).  The values on the xAxis are integers that represent dates and 15 minutes time periods i.e. 2010100400.  When I try to get a location on the x-axis to draw the line I get an arithmetic overflow error.  How do I correctly find the x-axis location ofr the line?

The second problem is that the lines do not scroll when the graph is scrolled.  As the chart scrolls, the lines are fixed in their x-axis position instead of scrolling to the correct x-axis location.  How do I get the lines to sync with the scroll window?

Any help greatly appreciated.

Regards

James O'Doherty

Parents
  • 26458
    Suggested Answer
    Offline posted

    The overflow happens because you're trying to convert a Long number to an Int. Try converting to Long instead, and you won't see this problem.

    With regards to scrolling, if you added your lines at some absolute screen coordinates, scrolling won't have any effect. If you used axis mapping for your lines, you should be able to see them move, because mapping results change when you scroll.

Reply Children