* ---------------------------------------
* This demo was created using amCharts 4.
* For more information visit:
* https://www.amcharts.com/
* Documentation is available at:
* https://www.amcharts.com/docs/v4/
* ---------------------------------------
am4core . useTheme ( am4themes_animated );
var chart = am4core . create ( " chartdiv " , am4charts . XYChart );
date: new Date ( 2018 , 0 , 1 ),
date: new Date ( 2018 , 0 , 2 ),
date: new Date ( 2018 , 0 , 3 ),
date: new Date ( 2018 , 0 , 4 ),
date: new Date ( 2018 , 0 , 5 ),
date: new Date ( 2018 , 0 , 6 ),
date: new Date ( 2018 , 0 , 7 ),
var categoryAxis = chart . xAxes . push ( new am4charts . DateAxis ());
categoryAxis . renderer . grid . template . location = 0 ;
//categoryAxis.renderer.minGridDistance = 30;
var valueAxis = chart . yAxes . push ( new am4charts . ValueAxis ());
function createSeries ( field , name ) {
var series = chart . series . push ( new am4charts . LineSeries ());
series . dataFields . valueY = field ;
series . dataFields . dateX = " date " ;
series . tooltipText = " {dateX}: [b]{valueY}[/] " ;
var bullet = series . bullets . push ( new am4charts . CircleBullet ());
bullet . circle . stroke = am4core . color ( " #fff " );
bullet . circle . strokeWidth = 2 ;
createSeries ( " value " , " Series #1 " );
createSeries ( " value2 " , " Series #2 " );
createSeries ( " value3 " , " Series #3 " );
chart . legend = new am4charts . Legend ();
chart . cursor = new am4charts . XYCursor ();
chart . series . each ( function ( series ) {