genxgeek
genxgeek

Reputation: 13367

High charts not displaying date correctly in x axis per epoch?

Two Part Q:

  1. Why is high charts not correctly aligning and displaying the following date on the x axis?
  2. How can I align the date on the x axis with the points in each series?

I have tried adjusting to tickinterval to various values but to no avail on either issue.

tickPixelInterval: 200

Fiddle->http://jsfiddle.net/EwpWh/

Upvotes: 1

Views: 2732

Answers (1)

Paweł Fus
Paweł Fus

Reputation: 45079

Use datetime axis instead of linear, see: http://jsfiddle.net/Fusher/EwpWh/5/

                           xAxis: {
                                type: 'datetime',
                                labels: {
                                    formatter: function () {
                                        return Highcharts.dateFormat('%m/%d', this.value);
                                    }
                                },
                                tickPixelInterval: 200
                            },

However if you want to have ticks exactly in the same place as points are, you need to use one of:

Upvotes: 2

Related Questions