Skip to content

shen-yu/hexo-tag-chart

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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 %}
Name Type Default Description
width decimal 100% The width of chart, responsive in window.
height number 300 The 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.

About

Insert Chartjs in Hexo by using tags. πŸ“ˆ

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published