2

We're trying to convert our cfcharts to use ZingChart JSON styling, as we'd like to upgrade to CF11 which wrecked all our charts.

I'm currently trying to set up the legend for a bar chart. Previously we were using this xml styling code in the cfchart to include the label and the total for each bar in the legend:

<legend><![CDATA[$(rowlabel) Total:$(colTotal)]]></legend>

In my example, the bars represent years, so an example of a legend item would be "2013 Total:34".

How can I accomplish this using ZingCharts? My legend code so far looks something like this:

"legend":{
            "backgroundColor":"#bdc3c7",
            "alpha":1,
            "borderWidth":0,
            "shadow":false,
            "borderRadius":10,
            "header":{
                "text":"Years",
                "borderRadius":10
            }
        }
4

1 回答 1

5

图例文本实际上来自对象text中的属性series

要获得您的系列的总价值,您可以使用代%psum币。这是使用您提供的图例代码的现场演示。右键单击并选择“查看源代码”以查看 JSON。

很多代币可供您使用,您甚至可以制作自己的.

我是 ZingChart 团队的一员,如果您在转换图表时有任何其他问题,我们随时为您提供帮助!

于 2015-02-09T21:19:21.960 回答