Tuesday, August 11, 2009

Spline chart with Multiple Axes in APEX

I got a message a few days ago of somebody wanting a Spline chart with multiple Y-axes as the lines had different scaling.

Here's a way to get what you want.

  1. Follow the wizards in APEX to create a normal line chart.
  2. Standard in APEX you have Anychart 3.3, but that doesn't allow multiple Y-axes and a Spline chart, so you need a higher version of Anychart for that. APEX Evangelists made it easy to upgrade to Anychart 5 with the Anychart Integration kit for APEX.
  3. Change the SELECT list of your serie to include a special alias e.g. "{n:Computer;t:Spline;y:ex}"
    That allows the integration kit to know that it needs to display the Spline type chart, with the name of Computer and it need to go on another Y-axe.
  4. Run your chart again and that should give you the new chart.

On the picture is a Spline chart with different Y-axes for Video and Computer.


If you want a nicer looking chart you might want to change your xml to Custom XML and add some specific Anychart 5 tags (e.g. for animation). The above example you find here with the source I used.


Apparently some people think I work for Anychart, which is not true. I work for APEX Evangelists (AE), a company 100% focussed on Oracle Application Express. APEX Evangelists offers training, development and consultancy services for APEX.
However it is true that I work(ed) closely with Anychart to create the Anychart integration kit for APEX and enhance it in time. APEX Evangelists is also the main partner of Anychart to deal with the APEX related questions and consultancy assignments (e.g. if you need help with creating your charts, maps, dashboards, ... or you want training in that area you can contact AE).

1 comment:

Louis-Guillaume Carrier-B├ędard said...

Hi Dimitri,

Can you give more information about special alias?
e.g. "{n:Computer;t:Spline;y:ex}"