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

Message ListMessage List     Post MessagePost Message

  [HELP] MultiChart JavaScript
Posted by Thiago Guimaraes on Oct-29-2019 23:17

I Have a 3 lines Chart and 1 Pie Chart together in a MultiChart, and I need to put JavaScript in the Line Charts tu use Zoom and TrackLine. I use the getJsChartModel() in the multichart but don't work, I see this error in the Chrome console :

TypeError: Cannot read property 'x' of undefined

Someone can a help me please?

I using java

  Re: [HELP] MultiChart JavaScript
Posted by Peter Kwan on Oct-30-2019 22:41
Hi Thiago,

Unluckily, the Javascript Chart Model currently only supports XY charts.

For your case, there are two methods:

(a) Put the XYCharts into the MultiChart, and leave the PieChart as a separate chart. You can use two ChartViewers on the two charts so the web page can display all the charts you need.


(b) Merge the PieChart into the XYChart, as that it becomes part of the XYChart. The PieChart is then just like a large logo image or background image in the XYChart. You just need to create an XYChart will some empty space reserved for the PieChart. The merge code is something like:

XYChart c = new XYChart(....);
... set up the complete XYChart as usual ...

PieChart p = new PieChart(....);
... set up the complete PieChart as usual ...

// merge the PieChart into the XYChart so that the top-left corner of the PieChart is at
// (leftX, topY) of the XYChart
c.makeChart3().merge(p.makeChart3(), leftX, topY, Chart.TopLeft, 0);

... add only the XYChart to the MultiChart ...

Hope this can help.

Peter Kwan