Home
Analytics
How to show last x-axis label in HTML5 chart with minTickInterval
aparandekar
Hi,
How can I set the following three properties on my HTML5 line chart using ClientScript.
xAxis: {
minTickInterval: 12,
showLastLabel: true,
endOnTick: true
},
The line chart shows monthly 5 year and 3 months of data and I would like the labels on the x-axis to show for Jan of every year and also the last month for the last year.
Suppose I have data from Jan 2008 - March 2013. I would like to show labels just for Jan 2008, Jan 2009, Jan 2010, Jan 2011, Jan 2012, Jan 2013, March 2013
Highcharts API has examples to do so by setting the above three properties. I tried using chart.xAxis but it didn't work.
Thanks.
Find more posts tagged with
Comments
bricombs
Good Day
With HTML5 charts, you can change the option in the beforeGeneration function. This function was added into Actuate 11 SP4, and is called before Actuate BIRT does any additional internal processing on the chart. You can find this under the Chart dialog's 4th tab Script > Client Script.
You may also want to use tickInterval and not minTickInterval as the min one deals with zooming on the chart.
for example in the before Generation function:
beforeGeneration: function(options)
{
options.xAxis ={
tickInterval: 12,
endOnTick: true,
showLastLabel: true
};
},