Chart

使用 C3.js 或者 Highcharts 绘制图形。

插件地址

C3.js:https://github.com/c3js/c3

highcharts:https://github.com/highcharts/highcharts

{
    "plugins": [ "chart" ],
    "pluginsConfig": {
        "chart": {
            "type": "c3"
        }
    }
}

type 可以是 c3 或者 highcharts, 默认是 c3.

下面是一个示例:

{% chart %}
{
    "data": {
        "type": "bar",
        "columns": [
            ["data1", 30, 200, 100, 400, 150, 250],
            ["data2", 50, 20, 10, 40, 15, 25]
        ],
        "axes": {
            "data2": "y2"
        }
    },
    "axis": {
        "y2": {
            "show": true
        }
    }
}
{% endchart %}

效果如下所示:

当前版本内容更新不及时,完整版请切换至 Gitbook 教程

results matching ""

    No results matching ""