echarts Interval is not working for axis Type "Time".

bxjv4tth  于 9个月前  发布在  Echarts
关注(0)|答案(1)|浏览(91)

Version

5.4.3

https://echarts.apache.org/examples/en/editor.html?c=candlestick-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurGAJ4gCmRA5JALZW0A0J6AhrngDIcBGVADYFUpUhGhgqAJwBuHIbAIAmNuIC-JDetjkc-Ikh0kAJhzAc8VMEQDa7YuPR5gAVxkBjGrAfPSYv6kHEQqAAy6QbD8RADMACyRQZ5EAIwRjv6mcQAcSVkWPrThqQDsALTp5SrxtJmkJlGBUSGw8RlR6DGwsQCs-c4pPR2d2bC9I1Hm0nQlFVUqvXVRjUHNQa2xqQPi3bF59eJDsbE7pGPxiYfnhbNhZZVh1QBsy0Gr_uv-mwed0Wn9a7oIaAv4XNRA2DTIpzR7VUpvfxafwAXUcyNgKN01hkECohF8ji-ZEoRU8HGgpiE-MgngA1qx6lRoJ5gKYfMT0Bg6NDGVFyPZaBxWLBaPwRbRPBLTLQUbAAPTy2AAC1kVGisHwsAA5hA5MyyAB3CDeWAsCAAM1ghvVuv1sE8mrAeGtwBkdMk2tg9Qx6AxaI0AG4gA

Steps to Reproduce

  1. plot a candle series
  2. xAxis Type should be time axis
  3. give interval value to the chart in axislabels

xAxis: {
type: 'time',
axisLabel:{
interval :2,
}
}

Current Behavior

Interval is not working for axis Type "Time".

option = {
xAxis: {
type: 'time',// type:'category' working
axisLabel:{
interval :2,
}
},
yAxis: {},
dataset: [
{
source: [
{
a: 20,
b: 34,
c: 10,
d: 38,
date: '2017-10-24'
},
{
a: 40,
b: 35,
c: 30,
d: 50,
date: '2017-10-25'
},
{
a: 31,
b: 38,
c: 33,
d: 44,
date: '2017-10-26'
},
{
a: 38,
b: 15,
c: 5,
d: 42,
date: '2017-10-27'
}
]
}
],
series: [
{
type: 'candlestick',
encode: {
x: 'date',
y: ['a', 'b', 'c', 'd'] // here b is given twice ,if we give c its working
}
}
]
};

Expected Behavior

interval should also work for time axis

Environment

  1. - OS:
  2. - Browser:
  3. - Framework:

Any additional comments?

No response

xkftehaa

xkftehaa1#

Its not supposed to work for axis type time. From the documentation:
Interval of Axis label, which is available in category axis.

相关问题