gridlines: { count: 15 },
slantedText: true,
slantedTextAngle: 45,
ticks: [{v: 1, f: "1/1/2003"}, {v: 2, f: "1/5/2003"}, ..., {v: 1, f: "#/#/####"}]
}
`
The reason for that is I am trying to create a continuous axis that shows a Date Series on a ColumnChart without displaying weekends.
The solution works, but (naturally), the number of ticks shown is fixed. Had the chart not needed Pan/Zoom functionality, I wouldn't bother, but with zooming, even a simple algorithm to keep the number of ticks reasonable fails.
Is there any way to just specify a formatter function instead of writing `ticks: [{f: 'FORMAT'}]`?Any help on this would be much appreciated.
--
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 google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/e65b0598-b392-43f3-9636-ecd2e376ef20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You can't specify a date format in the options, but you can do the formatting yourself outside of options using a DateFormat with the formatValue() method. See: https://developers.google.com/chart/interactive/docs/reference#dateformat
On Fri, Jul 28, 2017 at 10:20 AM, vlad <vzel...@gmail.com> wrote:
I am currently using the following code to format my data tick labels:`hAxis: {gridlines: { count: 15 },
slantedText: true,
slantedTextAngle: 45,
ticks: [{v: 1, f: "1/1/2003"}, {v: 2, f: "1/5/2003"}, ..., {v: 1, f: "#/#/####"}]}`The reason for that is I am trying to create a continuous axis that shows a Date Series on a ColumnChart without displaying weekends.The solution works, but (naturally), the number of ticks shown is fixed. Had the chart not needed Pan/Zoom functionality, I wouldn't bother, but with zooming, even a simple algorithm to keep the number of ticks reasonable fails.Is there any way to just specify a formatter function instead of writing `ticks: [{f: 'FORMAT'}]`?Any help on this would be much appreciated.
--
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 google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/e65b0598-b392-43f3-9636-ecd2e376ef20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/e65b0598-b392-43f3-9636-ecd2e376ef20%40googlegroups.com.
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/48a2f70d-5de1-42ba-902c-9382473beef1%40googlegroups.com.