You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2019/04/10 02:48:04 UTC
[GitHub] [incubator-echarts] quick-sort commented on issue #9344: pie图使用dataset,然后label使用{c},显示上有问题
quick-sort commented on issue #9344: pie图使用dataset,然后label使用{c},显示上有问题
URL: https://github.com/apache/incubator-echarts/issues/9344#issuecomment-481512419
in
> 在源码 test/pie.HTML 是使用
>
> ```
> dataset: {
> source: [
> {name: 'a', value: 123},
> {name: 'b', value: 456},
> {name: 'should be selected', value: 789, selected: true}
> ]
> },
> ```
> 就没有这个问题。
似乎这个也是有问题的
https://echarts.baidu.com/examples/editor.html?c=dataset-simple1
option = {
legend: {},
tooltip: {},
dataset: {
dimensions: ['product', '2015', '2016', '2017'],
source: [
{product: 'Matcha Latte', '2015': 43.3, '2016': 85.8, '2017': 93.7},
{product: 'Milk Tea', '2015': 83.1, '2016': 73.4, '2017': 55.1},
{product: 'Cheese Cocoa', '2015': 86.4, '2016': 65.2, '2017': 82.5},
{product: 'Walnut Brownie', '2015': 72.4, '2016': 53.9, '2017': 39.1}
]
},
xAxis: {type: 'category'},
yAxis: {},
// Declare several bar series, each will be mapped
// to a column of dataset.source by default.
series: [
{type: 'bar',
label: {
show: true,
formatter: a => JSON.stringify(a.value)
}
}
]
};
<img width="1280" alt="Screen Shot 2019-04-10 at 10 47 38 AM" src="https://user-images.githubusercontent.com/7898590/55847986-18b47f80-5b7e-11e9-9f86-ba40e41aa456.png">
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org