victormejia
victormejia

Reputation: 1184

Convert Highcharts stacked daily column from "day" to "month" view

I've googled around to be able to do this but haven't found the exact solution. Basically, I have a chart with daily data, and I was wondering if there is a way to dynamically convert the chart to a "month" view? I'm trying to see if I can achieve this without making a separate request to my RESTful API to return back grouped data.

Here is a js fiddle: http://jsfiddle.net/qenE8/1/

My goal is to have a dropdown with "Day" and "Month" views. Thanks in advance for your help.

My current object for the xAxis property is this:

              xAxis: {

                    "type": "datetime",
                    "minTickInterval": 86400000,
                    dateTimeLabelFormats: {
                        day: '%m/%d/%y' // mm/dd/yy
                    }
                }

Upvotes: 2

Views: 1015

Answers (1)

Sebastian Bochan
Sebastian Bochan

Reputation: 37578

You can use update() function on axis, and modify your tickInterval from day to month.

http://api.highcharts.com/highcharts#Axis.update()

Upvotes: 2

Related Questions