javascript - How to add right value y-axis to Amcharts Column and Line mix? -


i trying display y-axis right of charts : here's thelink!

i y-axis display in link "expensises" value , different scale right one. example 40 80.

thanks!

var chart = amcharts.makechart("chartdiv", {     "type": "serial",     "theme": "chalk",     "pathtoimages": "/lib/3/images/",     "automargins": false,     "marginleft":30,     "marginright":8,     "margintop":10,     "marginbottom":26,      "dataprovider": [{         "year": 2009,         "income": 23.5,         "expenses": 58.1     }, {         "year": 2010,         "income": 26.2,         "expenses": 52.8     }, {         "year": 2011,         "income": 30.1,         "expenses": 53.9     }, {         "year": 2012,         "income": 29.5,         "expenses": 55.1     }, {         "year": 2013,         "income": 30.6,         "expenses": 47.2,         "dashlengthline": 5     }, {         "year": 2014,         "income": 34.1,         "expenses": 49.9,         "dashlengthcolumn": 5,         "alpha": 0.2,         "additional": "(projection)"     }],     "valueaxes": [{         "axisalpha": 0,         "position": "left"     }],     "startduration": 1,     "graphs": [{         "alphafield": "alpha",         "balloontext": "<span style='font-size:13px;'>[[title]] in [[category]]:<b>[[value]]</b> [[additional]]</span>",         "dashlengthfield": "dashlengthcolumn",         "fillalphas": 1,         "title": "income",         "type": "column",         "valuefield": "income"     }, {         "balloontext": "<span style='font-size:13px;'>[[title]] in [[category]]:<b>[[value]]</b> [[additional]]</span>",         "bullet": "round",         "dashlengthfield": "dashlengthline",         "linethickness": 3,         "bulletsize": 7,         "bulletborderalpha": 1,         "bulletcolor": "#ffffff",         "uselinecolorforbulletborder": true,         "bulletborderthickness": 3,         "fillalphas": 0,         "linealpha": 1,         "title": "expenses",         "valuefield": "expenses"     }],     "categoryfield": "year",     "categoryaxis": {         "gridposition": "start",         "axisalpha":0,         "ticklength":0     } }); 

you need add new axis. add 3 axis in sample because have 3 columns in csv file reads should work amount of axises. adds axis left, next 1 right, , on :

 axises[n] = new amcharts.valueaxis();             axises[n].title = titles[n];             if ( n % 2 == 1 )                 {axises[n].position = "right";}             chart.addvalueaxis(axises[n]); 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -