简体   繁体   中英

How can I use months for the X axis of Shield UI Chart?

I need to place month on the X axis of the Shield UI Chart and do the following:

 axisX:{
  axisType: 'datetime',
  categoricalValues: ["Jan"]
 }. 

I specify the axis to be datetime, and give value for the first month. But the following months are not shown. Instead of that I have numbers. Why is that?

The categoricalValues property is a collection of point names either on the x or y axes. This are not datetime values, although they look like. For instance instead of months you could put car models or other names. Using categoricalValues with 'datetime' value for the exisType property makes no sense. Instead you need to fill in the necessary month names,

 categoricalValues: ["Jan", "Feb", "Mar", "Apr", "May", "Jun"]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM