[英]amcharts custom period date
AmCharts have some defaults formats for dates: AmCharts有一些日期的默认格式:
[{period:'fff',format:'JJ:NN:SS'},
{period:'ss',format:'JJ:NN:SS'},
{period:'mm',format:'JJ:NN'},
{period:'hh',format:'JJ:NN'},
{period:'DD',format:'MMM DD'},
{period:'WW',format:'MMM DD'},
{period:'MM',format:'MMM'},
{period:'YYYY',format:'YYYY'}]
I can use categoryAxis.minPeriod = "DD";
我可以使用
categoryAxis.minPeriod = "DD";
like in example below. 像下面的例子一样。
categoryAxis = chart.categoryAxis;
categoryAxis.gridAlpha = 0.00;
categoryAxis.axisAlpha = 0.30;
categoryAxis.inside = false;
categoryAxis.gridPosition = "start";
categoryAxis.title = gon.graph_info.horizontal_label
categoryAxis.parseDates = true
categoryAxis.minPeriod = "DD";
But I want to define or use periods with formats for four weeks , six month , etc in way that I can write like below 但是我想以如下方式编写或定义格式为四周 , 六个月等的句点,如下所示
categoryAxis = chart.categoryAxis;
categoryAxis.gridAlpha = 0.00;
categoryAxis.axisAlpha = 0.30;
categoryAxis.inside = false;
categoryAxis.gridPosition = "start";
categoryAxis.title = gon.graph_info.horizontal_label
categoryAxis.parseDates = true
categoryAxis.minPeriod = "TOW_MONTHS";
Looking at the documentation, this should be possible to do with the minPeriod
property of the category axis. 查看文档,这应该与类别轴的
minPeriod
属性有关。 See http://docs.amcharts.com/javascriptcharts/CategoryAxis#minPeriod 参见http://docs.amcharts.com/javascriptcharts/CategoryAxis#minPeriod
It's also possible to supply a number for increments, ie "15mm" which will instruct the chart that your data is supplied in 15 minute increments.
也可以提供一个增量数字,即“ 15mm”,它将指示图表以15分钟为增量提供数据。
In the case of two months, it should be 2MM
在两个月的情况下,应该是
2MM
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.