gpt4 book ai didi

amcharts - Amcharts 中轴的组类别

转载 作者:行者123 更新时间:2023-12-02 21:46:13 27 4
gpt4 key购买 nike

amcharts 轴中可以有组吗?

检查 highcharts 中的示例:example

最佳答案

有点......这不是官方功能,但你可以伪造它。

您可以为标签创建一个图表,其中 valueField 始终为零。您还需要偏移类别轴,以便标签不会相互隐藏。

这是一个示例:http://jsfiddle.net/amcharts/XY2cD/

// each data provider has a label property
dataProvider :
[{ ... ,
"label": 0
}, ... ],
// the first graph in each 'cluster' is for the label
"graphs": [
{
"type": "column",
"fillAlphas": 0, // hide this column
"lineAlpha": 0, // hide this column
"title": "my sub group name",
"valueField": "label", // this is the field that's always zero
"showAllValueLabels": true, // even though the field is zero - the label will be shown
"labelText": "\n[[title]]" // start this with a newline so it's below the axis
}, ... ],
"categoryAxis": {
"labelOffset": 15
}

(不是我的 fiddle ,我只是在网上找到的)

关于amcharts - Amcharts 中轴的组类别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22590155/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com