A
A
Alexyz Canson2019-11-14 17:02:07
JavaScript
Alexyz Canson, 2019-11-14 17:02:07

How to set chart start to non-0?

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<style type="text/css">
#container {

  height: 400px;
  width: 100px
}
</style>




<div id="container" class="chart_wrap"></div>
<script type="text/javascript">
Highcharts.chart('container', {

    chart: {type: 'column'},
    title: {text: ''},
    subtitle: {text: ''},
    xAxis: {type: 'category'},
    yAxis: {title: {text: ' '}},
    legend: {enabled: false},
    plotOptions: {
        series: {
            borderWidth: 0,
            dataLabels: {
                enabled: true,
                format: '{point.y:.1f}%'
            }
        },
     line: {animation: false},
     series: {animation: false}
    },

    tooltip: {	crosshairs: false,},

    series: [{
        name: 'Brands',
        colorByPoint: true,
        data: [{
            name: 'NAME',
            y: 10,
      color:"green",
            drilldown: 'NAME'
        }]
    }],


   
});
</script>

Help to set the maximum and minimum value in the Y-axis, for example, 10 and 3, so that they are fixed on the chart and shown
in the center so that it is 6, not 0

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question