Thanks Sergey, I followed your advice and I used *datetime. *It works really well.
My question now is, how can I display the hour in the x-axis as AM/PM? Τη Παρασκευή, 31 Ιουλίου 2015 - 12:56:40 μ.μ. UTC-7, ο χρήστης Sergey έγραψε: > > Hi Kostas, > > You're using strings for your domain, which makes the chart interpret them > as discrete, and therefore create a categorical (discrete) axis, where > "03:00am" is value 0, "04:00am" is value 1, and so on. You could achieve > exactly the same thing (with different labels) if you were to use values > like 'a', 'b', 'c', etc. The charts order your data by row, so duplicate > data won't be collapsed on the known category, but instead will be > processed as a new category. > > All that said, there are two to three ways in which you could fix this > (depending on how you count): > *1. Collapse the values yourself.* > I don't understand why you're creating new rows and using null values when > your labels are exactly the same. Just having one set of unique labels > should be enough, and is the recommended approach (assuming you don't want > to go with fix #2). Here is an example of this: > http://jsfiddle.net/aL0bx0qd/1/ > > *2. Use a date or time type (datetime, timeofday)* > This is actually the recommended fix. This will allow the chart to > recognize that what you're plotting is time and do special logic, like > insert extra ticks at 2:30am. *I strongly recommend that you take this > approach*. > Here is this approach using timeofday (which makes more sense at the > moment since you don't appear to have any concept of the day you're > plotting data for): http://jsfiddle.net/aL0bx0qd/2/ > Here is this approach using datetime (I filled in the year, month, and day > with fake values): http://jsfiddle.net/aL0bx0qd/3/ > > On Fri, Jul 31, 2015 at 3:45 PM Kostas Poulakidas <[email protected] > <javascript:>> wrote: > >> >> I want to display these 2 charts in the same diagram. >> But they are displayed one after the other. Why is this happening? >> >> http://jsfiddle.net/aL0bx0qd/ >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google Visualization API" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] >> <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at >> http://groups.google.com/group/google-visualization-api. >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
