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 lines
1.5 KiB
/*!
|
|
* stack-admin-theme (https://pixinvent.com/bootstrap-admin-template/stack)
|
|
* Copyright 2018 PIXINVENT
|
|
* Licensed under the Themeforest Standard Licenses
|
|
*/
|
|
!function(window,document,$){"use strict";for(var seriesData=[[],[],[],[]],random=new Rickshaw.Fixtures.RandomData(150),i=0;i<150;i++)random.addData(seriesData);var liveVisits=$("#live-visits"),liveVisitsGraph=new Rickshaw.Graph({element:liveVisits.get(0),width:liveVisits.width(),height:400,renderer:"area",stroke:!0,series:[{color:"#99B898",data:seriesData[0],name:"Asia"},{color:"#FECEA8",data:seriesData[1],name:"Africa"},{color:"#FF847C",data:seriesData[2],name:"America"},{color:"#6C5B7B",data:seriesData[3],name:"Europe"}]});liveVisitsGraph.render(),setInterval(function(){random.removeData(seriesData),random.addData(seriesData),liveVisitsGraph.update()},2e3);new Rickshaw.Graph.HoverDetail({graph:liveVisitsGraph}),new Rickshaw.Graph.Behavior.Series.Toggle({graph:liveVisitsGraph});$(window).on("resize",function(){liveVisitsGraph.configure({width:liveVisits.width()}),liveVisitsGraph.render()});var liveVisitsDoughnut=$("#live-visits-doughnut"),liveVisitsOptions={responsive:!0,maintainAspectRatio:!1,responsiveAnimationDuration:500},liveVisitsData={labels:["Asia","Africa","America","Europe"],datasets:[{label:"My First dataset",data:[15684,54789,89756,23489],backgroundColor:["#99B898","#FECEA8","#FF847C","#6C5B7B"]}]},liveVisitsConfig={type:"doughnut",options:liveVisitsOptions,data:liveVisitsData};new Chart(liveVisitsDoughnut,liveVisitsConfig)}(window,document,jQuery); |