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
35
multiple y axis on the same chart
posted

Hello,

Can anyone help us for the following ?

Let's explain what we want to do with the Charting JSF library.
We would like to display a 2D graph with two different kinds of Y series.
One for volumes and another one for prices.

The file attached gives you an idea of what we would like to have.

Using the chart component, we are able to specify more than one series.
But how can we define another Y axis ?

Thanks for your help

Please find below the JSF code we are currently using:


<ig:chart id="chart" rendered="#{ourBean.profileTable.chartRendered}" groupType="Overlay" projectionType="2d" style="width: 400px; height: 400px;">

  <ig:caption caption="#{ourBean.profileTable.chartTitle}" position="top" style="font-size: 10; " />
  <ig:legend position="right" autoItems="true" />

  <ig:axis type="y" autoRange="true" autoGridLines="true" autoTickMarks="true" />
  <ig:axis type="x" autoRange="true" autoGridLines="true" autoTickMarks="false" >
    <ig:tickMark value="0" tickCaption="T" />
    <ig:tickMark value="1" tickCaption="T-1" />
    <ig:tickMark value="2" tickCaption="T-2" />    
    <ig:tickMark value="3" tickCaption="T-3" />    
  </ig:axis>

  <ig:series markerBulletVisible="true"
    legendCaption="#{ourBean.profileTable.turnoverChart.legend}"
    chartType="line"
    dataMapping="value: value; tooltipCaption: tooltip; "
    dataSource="#{ourBean.profileTable.turnoverChart}" />               
         
  <ig:series markerBulletVisible="false"
    legendCaption="#{ourBean.profileTable.frequencyChart.legend}"
    chartType="column"
    dataMapping="value: value; tooltipCaption: tooltip"
    dataSource="#{ourBean.profileTable.frequencyChart}" />
</ig:chart>