0.0.5 • Published 1 year ago

hexo-next-charts v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

hexo-next-charts

node npm Hexo v6.3.0 NexT v8.14.2 size

English | 简体中文

Add chart label for Hexo Next theme


Note: This plugin may only work properly with the NexT theme


Installation

npm install hexo-next-charts --save

Config

Add the following to your hexo config or theme config

# Add chart in your post
# For more infomation: https://echarts.apache.org/
charts:
  enable: true
  libUrl: # Custom Echarts.js CDN URL
  darkmode: true # Only valid for charts provided by plugin

Usage

Use as a tag in md files

{% chart type:  %}
<you echarts option>
{% endchart %}

e.g.

{% chart type:nromal %}
{
    title: {
        text: 'ECharts 入门示例'
    },
    tooltip: {},
        legend: {
        data: ['销量']
    },
    xAxis: {
        data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
    },
    yAxis: {},
	series: [
		{
            name: '销量',
            type: 'bar',
            data: [5, 20, 36, 10, 10, 20]
          }
    ]
}
{% endchart %}

Options

NameTypeDefault valueOptional valueDescription
typeString"nromal""nromal""postsChart""postsCalendar""tagsChart""nromal" is customer
widthString"100%"XDOM width for Echarts
heightString"300px"XDOM height for Echarts
themeString"light"more infomationEcharts theme
renderer"String""canvas""canvas""svg"Echarts rendererr

Demo

Click to jump

Screenshot

PostsChart

npm.io

PostsCalendar

npm.io

TagsChart

npm.io

Version Log

  • v0.0.5
    • Fix incomplete statistics of articles
    • Add darkMode
  • v0.0.4
    • Rewrite file structure
  • v0.0.3
    • Add README.md file
0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago