* ---------------------------------------
* 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 );
category: " Distribution " ,
var categoryAxis = chart . xAxes . push ( new am4charts . CategoryAxis ());
categoryAxis . dataFields . category = " category " ;
categoryAxis . renderer . grid . template . location = 0 ;
//categoryAxis.renderer.minGridDistance = 30;
categoryAxis . renderer . labels . template . events . on ( " over " , function ( ev ) {
var point = categoryAxis . categoryToPoint ( ev . target . dataItem . category );
chart . cursor . triggerMove ( point , " soft " );
categoryAxis . renderer . labels . template . events . on ( " out " , function ( ev ) {
var point = categoryAxis . categoryToPoint ( ev . target . dataItem . category );
chart . cursor . triggerMove ( point , " none " );
var valueAxis = chart . yAxes . push ( new am4charts . ValueAxis ());
valueAxis . tooltip . disabled = true ;
var series = chart . series . push ( new am4charts . ColumnSeries ());
series . dataFields . valueY = " value " ;
series . dataFields . categoryX = " category " ;
series . tooltipText = " {categoryX}: {valueY} " ;
chart . cursor = new am4charts . XYCursor ();
chart . cursor . lineY . disabled = true ;
chart . cursor . lineX . disabled = true ;