amcharts-height
by amcharts
HTML
<!-- amCharts -->
<script src="https://www.amcharts.com/lib/4/core.js"></script>
<script src="https://www.amcharts.com/lib/4/charts.js"></script>
<script src="https://www.amcharts.com/lib/4/themes/animated.js"></script>
<div id="container">
</div>
CSS
#container {
width: 940px;
height: 350px;
/* We need the height of the y axis from 0 to 100 to be approximately 235px */
}
JavaScript
class LineChart {
constructor(div, data, series, ranges, hasFilter, filterTitle, filters) {
am4core.useTheme(am4themes_animated);
am4core.options.commercialLicense = true;
var chart = am4core.create(div, am4charts.XYChart);
this.chart = chart;
this.chart.legend = new am4charts.Legend();
this.chart.legend.position = "top";
this.chart.cursor = new am4charts.XYCursor();
this.chart.legend.fontSize = 12;
this.chart.legend.position = "top";
this.chart.legend.contentAlign = "left";
this.chart.legend.paddingLeft = 0;
this.chart.legend.paddingBottom = 10;
this.chart.legend.scrollable = true;
this.chart.legend.maxHeight = 40;
this.chart.numberFormatter.numberFormat = "#.";
var valueAxis = this.chart.yAxes.push(new am4charts.ValueAxis());
valueAxis.tooltip.disabled = false;
valueAxis.min = 0;
valueAxis.max = 100;
valueAxis.renderer.minGridDistance = 1;
valueAxis.renderer.fontSize = 11;
this.categoryAxis = this.chart.xAxes.push(new am4charts.CategoryAxis());
this.categoryAxis.dataFields.category = "timeframe";
this.categoryAxis.renderer.labels.template.rotation = 90;
this.categoryAxis.renderer.labels.template.rotation = 90;
this.categoryAxis.renderer.grid.template.disabled = true;
this.categoryAxis.renderer.fontSize = 11;
this.categoryAxis.renderer.labels.template.verticalCenter = "middle";
this.categoryAxis.renderer.labels.template.horizontalCenter = "top";
this.categoryAxis.renderer.minGridDistance = 10;
this.categoryAxis.renderer.fontSize = 11;
this.chart.data = data;
var t = this;
var c = ["#31CFDD", "#4467E9", "#C444E9", "#B49595", "#5555A8", "#FFB4A8", "#FFA8FC", "#67E944", "#6744E9", "#44E967", "#E94467", "#E96744", "#33FF33", "#FFFF33", "#FF3333", "#8EFF70", "#000000", "#EFEFEF", "#FF1493", "#F5F5F5", "#FFB6C1", "#B22222", "#FFFACD", "#FF69B4", "#800000", "#228B22", "#FFD700", "#ADFF2F", "#9CCC65", "#D4E157", "#64DD17",...