javascriptchartskeen-io

Keen IO - Set min / max for Y axis


I've downloaded a dashboard sample using Keen and I'm tyring to set a MIN / MAX value for the Y axis.

I've tries this SO post which didn't work for me: Maximum and Minimum Y-Axis Values on Keen.io Dashboard Charts

Below is my code:

  var chart = new Keen.Dataviz()
    .el('#chart-01')
    .type('area')
    .height(280)
    .stacked(false)
    .title('Trades Per Symbol')
    .prepare();

    chart
    .data(data)
    .render();

Any suggestions will be appreciated.


Solution

  • Found it..

    For anyone else struggling:

    chart
    .data(data)
    .chartOptions({
        axis: {
            y: {
                min:10,
                max:20
            }
        }
    })
    .render();