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

How to change Date formate in Google charts - Stack Overflow

programmeradmin3浏览0评论

enter image description here

I have created a Gantt chart to display users' in-progress tasks, fetching data from a SharePoint list using a CAML query. The data is successfully displayed on the graph, but the x-axis is showing an incorrect date format.

I want the dates to appear in the 'MMM d' format (e.g., Jan 8, Jun 15). I have already set this format in the code as shown below:

var options = {
    height: 400,
    gantt: {
        trackHeight: 40,
        criticalPathEnabled: false, // Optional
        labelStyle: { fontName: "Arial", fontSize: 12 },
        axisTitlesPosition: "out"
    },
    hAxis: {
        format: 'MMM d' // Expected format: Jan 8, Jun 15, etc.
    }
};

I have attached a pic , PFA..

I have tried to change the format dates but have been unable to success in that

发布评论

评论列表(0)

  1. 暂无评论