Visualization Combo Chart dual axis chart -
im working on report, need populate graph dual axis, can me out find how can impelment that, here sample chart need.
i im trying use https://developers.google.com/chart/interactive/docs/gallery/combochart looking not work me.
thanks.
this should started...
google.load("visualization", "1", { packages: ["corechart"] }); google.setonloadcallback(drawchart); function drawchart() { var data = google.visualization.arraytodatatable([ ["week ending","actual ft", "recommended fte", "other tickets", "router tickets"], ["7/1", 1800, 1900, 19, 22], ["7/8", 1800, 1900, 20, 23], ["7/15", 1800, 1900, 20, 23], ["7/22", 1800, 1900, 19, 22], // .. ["9/29", 1800, 1900, 29, 30] ]); var options2 = { vaxes: [{ minvalue: 1200, maxvalue: 2500 }, { minvalue: 17, maxvalue: 30 }], curvetype: 'function', haxis: { title: "week ending" }, series: { 0: { type: "bars", targetaxisindex: 0, color: "blue" }, 1: { type: "bars", targetaxisindex: 0, color: "green" }, 2: { type: "line", targetaxisindex: 1, color: "red" }, 3: { type: "line", targetaxisindex: 1, color: "cyan" } } }; var chart = new google.visualization.linechart(document.getelementbyid("chart")); chart.draw(data, options2); }
<script type="text/javascript" src="https://www.google.com/jsapi"></script> <div id="chart" style="width: 900px; height: 300px;"></div>
Comments
Post a Comment