【问题标题】:Fusioncharts - Negative Y-Axis FormatFusioncharts - 负 Y 轴格式
【发布时间】:2016-06-05 19:14:15
【问题描述】:

是否可以在融合图中对负 Y 轴进行格式化,如附图所示?

Fusionchart Sample Image

问候, 啧啧。

【问题讨论】:

    标签: fusioncharts


    【解决方案1】:

    当然可以,

    您可以使用labelFontColor 属性来设置标签的数据颜色。

    问题是从 3.5.0 版本开始引入的 (Source)。

    这是一个JSFIDDLE 示例。

    FusionCharts.ready(function () {
        var topStores = new FusionCharts({
            type: 'bar2d',
            renderAt: 'chart-container',
            dataFormat: 'json',
            dataSource: {
                "chart": {
                    "caption": "Positive/negative label data costumising",
                    "yAxisName": "Sample",               
                },
    
                "data": [
                    {
                        "labelfontcolor": "FF0000",
                        "label": "This is a negative value",
                        "value": "-200"
                    }, 
                    {
                        "label": "A positive value",
                        "value": "200"
                    }, 
                    {
                        "label": "Another positive value",
                        "value": "100"
                    } 
    
                ]
            }
        })
        .render();
    });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-04-22
      相关资源
      最近更新 更多