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.5 KiB

6 years ago
/*!
* 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=$("#scatter-multi-axis"),chartOptions={responsive:!0,maintainAspectRatio:!1,responsiveAnimationDuration:800,hoverMode:"single",title:{display:!0,text:"Chart.js Scatter Chart - Multi Axis"},scales:{xAxes:[{position:"bottom",gridLines:{zeroLineColor:"rgba(0,0,0,1)",color:"#f3f3f3",drawTicks:!1}}],yAxes:[{type:"linear",display:!0,position:"left",id:"y-axis-1",gridLines:{zeroLineColor:"rgba(0,0,0,.1)",color:"#f3f3f3",drawTicks:!1}},{type:"linear",display:!0,position:"right",reverse:!0,id:"y-axis-2",gridLines:{drawOnChartArea:!1}}]}},chartData={datasets:[{label:"My First dataset",xAxisID:"x-axis-1",yAxisID:"y-axis-1",data:[{x:65,y:-28},{x:-59,y:48},{x:-80,y:40},{x:81,y:-19},{x:-56,y:86},{x:55,y:-27},{x:-40,y:89}],backgroundColor:"rgba(81,117,224,.6)",borderColor:"transparent",pointBorderColor:"#5175E0",pointBackgroundColor:"#FFF",pointBorderWidth:2,pointHoverBorderWidth:2,pointRadius:4},{label:"My Second dataset",xAxisID:"x-axis-1",yAxisID:"y-axis-2",data:[{x:45,y:-17},{x:-25,y:62},{x:-16,y:78},{x:36,y:-68},{x:67,y:-26},{x:-18,y:48},{x:76,y:-73}],backgroundColor:"rgba(209,212,219,.4)",borderColor:"transparent",pointBorderColor:"#D1D4DB",pointBackgroundColor:"#FFF",pointBorderWidth:2,pointHoverBorderWidth:2,pointRadius:4}]},config={type:"scatter",options:chartOptions,data:chartData};new Chart(ctx,config)});