1

I am using wicket-charts to create a chart on a page. I'm trying to make a graph that looks a lot like the example on this page http://code.google.com/p/wicket-charts/ I want two y-axis - one on each side of the graph. However the example code doesn't seem to do that. I can see how to do it in js from highcharts examples on http://www.highcharts.com but I can't work out how to implement it using wicket-charts.

Please help!

4

1 回答 1

0

The latest code in the wicket-charts svn has the class "Options" with a method called addyAxis.

/**
 * Adds an YAxis to the chart. You can use {@link #setyAxis(Axis)} if you want
 * to define a single axis only.
 * 
 * @param yAxis
 *          the YAxis to add.
 * @return the {@link Options} object for chaining.
 */
public Options addyAxis(final Axis yAxis) {
    if (this.getyAxis() == null) {
        this.setyAxis(new ArrayList<Axis>());
    }
    this.getyAxis().add(yAxis);
    return this;
}

I think this method is in the wicked-charts-highcharts-1.3.0-SNAPSHOT.jar version, if not they might not have released it yet. Im pretty sure this is what you need.

于 2012-10-04T10:42:57.147 回答