1. 描述

2. 插件地址

https://www.npmjs.com/package/gitbook-plugin-chart

3. 插件引用

{
    "plugins": ["chart"]
}

4. 引用方法

[!danger] the content of the blocks should be written in pure JSON. That is, each property should be quoted, and you should strictly use double quotes ", not single quotes '

// Invalid JSON
{
    data: {
type: 'bar'
    }
}

// Valid JSON
{
    "data": {
"type": "bar"
    }
}

You SHOULD NOT specify the bindto property for the chart.

{% chart %}
{
    "data": {
        "type": "bar",
        "columns": [
            ["data1", 30, 200, 100, 400, 150, 1500, 2500],
            ["data2", 50, 100, 300, 450, 650, 250, 1320]
        ]
    },
    "axis": {
        "y": {
        "tick": {
            "format": d3.format("$,")
        }
    }
    }
}
{% endchart %}

5. 更多

参考gitbook-plugin-chart

results matching ""

    No results matching ""