How to tell Highcharts to set date on the x axis, and use a range of time (like 1 day) -


I am trying to understand this issue; I have a data file that includes dates for each of my values ​​i when I use it on x axis; The result is that the X axis will divide the values ​​evenly, so if any point is 2:30 2:31 and the second is at 2:32, the value will be equally at the same place; While I was hoping that X axis will be split on the first and last date (like in 2 days, 3 if 3 days is even more)

Instead I would like to spend an hour, or one There is a limit on the basis of day, and see how many points fit in that category. Example of how data is organized:

  a, b, c, d 1.1,2.2,3.3,4.4 June 13 22:30, June 13 23:02, June 13 23: 05, June 14 1:10   

I have typed the date time in X axis, and with the dates the third line is assigned to categories.

Edit:

The problem is that the date format is; I successfully convert the string to the date

  New date (value)   

gives me full date format:

Wed Jul 11 ​​-001 17:32:10 GMT-0700 (PDT)

The odd thing is that the tooltip, which I set to display it, is showing the number from 1 to 10, the date Instead of . Not sure why this may be the reason why I can not make a graph like this, using my data as an example above. <2 p>

Edit 2: Thanks to Sebastian and Scam for suggestions, I was able to reach this point:

Now it is doing almost everything right; Except that if I comment on tick intervals, then I will get 4 ticks, each point (basic problem); However, if I disassemble it; Chart attracts the first date, but not to others.

Therefore, due to error many tests After that <<< p>

1) You need to convert dates: they will not work as strings, because the highchikes want to see dates in JS format (either milliseconds or new date (string data) Has been formatted in

2) In other cases, you have a head You can put a set of values ​​in the soil, and the second in the second array, and keep them as categories and series; When you deal with the date, you need a 2D array with the date (changed) and the associated value.

3) You should not assign data to categories; Otherwise, you are trying to understand why this will not work. You just need to add the 2D array to the data: and this will only work ?? ¢

Hope this will help others; It spends a lot of time in finding out, and thanks to other members who took me closer to the solution!

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -