Mirza Chilman
Mirza Chilman

Reputation: 429

HighChartTable.js yAxis integer Only

I am using highcharttable to build my graph, but if the input at yAxis is too small, they will use floating number which is i don't want, i want integer only, how to resolve this? so far i did something like this, but it's not working, it also caused because they lack of documentation for something like this

$('table.highchart').highchartTable({
yAxis: {
  allowDecimals:false,
  labels: {
    style: {
      fontSize: '9px',
      width: '175px'
      }
    },
  }
});

Upvotes: 0

Views: 50

Answers (1)

Deep 3015
Deep 3015

Reputation: 10075

Update your initialization

$(document).ready(function() {
  $('table.highchart')
    .bind('highchartTable.beforeRender', function(event, highChartConfig) {
      highChartConfig.yAxis = {
        allowDecimals: false,
        title: {
          text: 'Flats'
        }
      }
    })
    .highchartTable();
});

Fiddle demo

Reference you can apply same logic for yAxis

Upvotes: 1

Related Questions