You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6 lines
1.3 KiB
6 lines
1.3 KiB
/*!
|
|
* stack-admin-theme (https://pixinvent.com/bootstrap-admin-template/stack)
|
|
* Copyright 2018 PIXINVENT
|
|
* Licensed under the Themeforest Standard Licenses
|
|
*/
|
|
$(window).on("load",function(){var ctx=$("#line-multi-axis"),chartOptions={responsive:!0,maintainAspectRatio:!1,hoverMode:"label",stacked:!1,title:{display:!0,text:"Chart.js Line Chart - Multi Axis"},scales:{xAxes:[{display:!0,gridLines:{offsetGridLines:!1,color:"#f3f3f3",drawTicks:!1},scaleLabel:{display:!0}}],yAxes:[{type:"linear",display:!0,gridLines:{color:"#f3f3f3",drawTicks:!1},position:"left",id:"y-axis-1"},{type:"linear",display:!0,position:"right",id:"y-axis-2",gridLines:{drawOnChartArea:!1,color:"#f3f3f3",drawTicks:!1}}]}},chartData={labels:["January","February","March","April","May","June","July"],datasets:[{label:"My First dataset",data:[15,45,-17,-42,55,-24,18],yAxisID:"y-axis-1",backgroundColor:"rgba(209,212,219,.4)",borderColor:"transparent",pointBorderColor:"#D1D4DB",pointBackgroundColor:"#FFF",pointBorderWidth:2,pointHoverBorderWidth:2,pointRadius:4},{label:"My Second dataset",data:[-26,44,16,42,-38,-9,46],yAxisID:"y-axis-2",backgroundColor:"rgba(81,117,224,.7)",borderColor:"transparent",pointBorderColor:"#5175E0",pointBackgroundColor:"#FFF",pointBorderWidth:2,pointHoverBorderWidth:2,pointRadius:4}]},config={type:"line",options:chartOptions,data:chartData};new Chart(ctx,config)}); |