最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to format hAxis label date in google chart - Stack Overflow

programmeradmin1浏览0评论

I saw this documentation on Google Developer site, they show me how to format hAxis label but only label with number format. I don't know how to format the labels that use date format. Here is my chart:

I want to format the date from Dec 7, 2015 to 7 Dec.

I saw this documentation on Google Developer site, they show me how to format hAxis label but only label with number format. I don't know how to format the labels that use date format. Here is my chart:

I want to format the date from Dec 7, 2015 to 7 Dec.

Share Improve this question asked Dec 4, 2015 at 2:47 Duc DoanDuc Doan 4151 gold badge4 silver badges17 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 14
var options = {
    hAxis: {
      format: 'd MMM',
}

JSFiddle

See documentation here: https://developers.google./chart/interactive/docs/datesandtimes#formatting-axis-gridline-and-tick-labels

发布评论

评论列表(0)

  1. 暂无评论