1.0.8 • Published 4 years ago

hexo-tag-chart v1.0.8

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

hexo-tag-chart

npm npm

Insert Chartjs in Hexo site by using tags.

English | 中文说明

Install

$ npm install hexo-tag-chart --save

Usage

{% chart [width] [height] %}
\\Chartjs options goes here
{% endchart %}
NameTypeDefaultDescription
widthdecimal100%The width of chart, responsive in window.
heightnumber300The height of chart (px).

Example

Line

{% chart 80% 300 %}
{
    type: 'line',
    data: {
        labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
        datasets: [{
            label: 'My First dataset',
            backgroundColor: 'rgb(255, 99, 132)',
            borderColor: 'rgb(255, 99, 132)',
            data: [0, 10, 5, 2, 20, 30, 45]
        }]
    },
    options: {
        responsive: true,
        title: {
            display: true,
            text: 'Chart.js Line Chart'
        }
    }
};
{% endchart %}

line chart

For more details, visit Demo here.

1.0.8

4 years ago

1.0.5-0

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.0

4 years ago