You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by Ҷ <79...@qq.com.INVALID> on 2022/08/08 10:35:41 UTC
求教日历图如何与series.encode映射
我在沙盒(https://echarts.apache.org/examples/zh/editor.html)中编写了如下options:
const datas = [
{
day:new Date(2022,8,7),
value: 10,
},
{
day:new Date(20022,8,8),
value:20,
},
]
option = {
dataset:{
dimensions:['day','value'],
source:datas,
},
visualMap:{
type:'piecewise',
orient:'horizontal',
min:0,
max:30,
},
calendar:{
range:'2022',
},
series: [
{
type: 'heatmap',
coordinateSystem:'calendar',
encode:{
time:'day',
value:'value',
},
}
]
};
我期望的显示方式是显示两个亮点,一个是2022年8月7号的,一个是2022年8月8号的,我在官网教程中,没有找到日历坐标系的encode配置方式,但是在源代码中找到其会读取time和value,但是我这边设置无效。
如图所示,显示的高亮完全不对。我看官方示例并没有使用dataset,也没有设置encode,而是直接设置了series.data,然后貌似默认读取了第一列和第二列?我没有找到如何处理这个问题的方法,恳请告知我如何解决。
?
791363454@qq.com