answered
2021-04-07 14:32:21 +0800
hawk 2785 ● 1 ● 5
http://hawkphoenix.blogsp...
I think the combined domain charts you mean is: http://www.java2s.com/Code/Java/Chart/JFreeChartCombinedXYPlotDemo1.htm
I summarize its characteristics:
- 2 charts are in separate positions
- both charts have the same x-axis but different y-axes
Zk Charts doesn't have exactly the same chart type. But I think you can simulate it with 2 charts. The steps are:
- create 2 line charts, put them in vertical order, the upper and lower one
- both charts are set to the same x-axis values (In
JFreeChartCombinedXYPlotDemo1
, it also sets the same x values for all series) - hide the upper chart's x-axis value
chart.getXAxis().getLabels().setEnabled(false)
I think these steps will make 2 charts look quite similar to JFreeChartCombinedXYPlotDemo1
. I think the main difference is:
JFreeChartCombinedXYPlotDemo1
has one legend with 3 series, but ZK charts has 2 legends.
Is this solution feasible for you?
Have you seen this example? Combination chart with dual axes: https://www.zkoss.org/zkchartsdemo/combodualaxes
jeanher ( 2021-04-06 12:12:54 +0800 )editYes, but it's not a combined domain chart. It's similar to highchart stocks.
bztom35 ( 2021-04-06 12:46:32 +0800 )editZK charts doesn't cover highcharts stock. We'll have to see if there's a different approach.
jeanher ( 2021-04-07 09:11:05 +0800 )edit