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

Message ListMessage List     Post MessagePost Message

  ChartViewer.setMouseUsage doesn't do anything
Posted by Frans Verschuren on Jan-03-2008 00:23
Hello,

I've got a ChartViewer on a JPanel. The ChartViewer is called viewer and it shows a FinanceChart with a CandleStick. When I do viewer.setMouseUsage(Chart.MouseUsageZoomIn); nothing happens. The cursor doesn't change and when I click on the chart, nothing happens. Am I forgetting something?

Regards,

Frans

  Re: ChartViewer.setMouseUsage doesn't do anything
Posted by Peter Kwan on Jan-03-2008 03:44
Hi Frans,

If you are using "viewer.setImage(c.makeImage());" to set the chart to the viewer, note that for Zoomable and Scrollable charts, you need to modify the code to "viewer.setChart(c);".

Hope this can help.

Regards
Peter Kwan

  Re: ChartViewer.setMouseUsage doesn't do anything
Posted by Frans Verschuren on Jan-03-2008 19:49
Hi Peter,

That did the trick, but it still not working like I want it to. Whenever I try to zoom in, the ViewPortChangedEvent is called, and it copy's the data like it's supposed to. But when I do viewer.setChart(c); to display the zoomed chart, the chart doesn't have the right height. It is displayed as a single white line (I set the backgroundcolor to white). Any idea why this is?

Regards,

Frans

  Re: ChartViewer.setMouseUsage doesn't do anything
Posted by Frans Verschuren on Jan-03-2008 22:45
Oh, I found my mistake. Thanks for your help.

  Re: ChartViewer.setMouseUsage doesn't do anything
Posted by Raul on Oct-03-2011 23:50
Frans Verschuren wrote:

Oh, I found my mistake. Thanks for your help.

Hi Frans,

Which was your mistake, because I am having just the same problem.

Thanks,