# hexo-tag-gcharts

> A hexo tag for inserting google charts in your blog

Latest version **0.2.1** (published 2021-04-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install hexo-tag-gcharts
pnpm add hexo-tag-gcharts
yarn add hexo-tag-gcharts
bun add hexo-tag-gcharts
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2021-04-22 |
| First published | 2021-04-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kim Byoung Chul |
| Maintainers | skyksit |
| Keywords | hexo, googlecharts, chart, charts |

## Links

- npm: https://www.npmjs.com/package/hexo-tag-gcharts
- Repository: https://github.com/skyksit/hexo-tag-gcharts
- Homepage: https://github.com/skyksit/hexo-tag-gcharts#readme
- Issues: https://github.com/skyksit/hexo-tag-gcharts/issues
- npm.io page: https://npm.io/package/hexo-tag-gcharts

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 0.2.1 (latest) — 2021-04-22
- 0.2.0 — 2021-04-21
- 0.1.0 — 2021-04-18
- 0.1.0-beta.1 — 2021-04-16

## README

# hexo-tag-gcharts
A hexo tag for inserting [google charts](https://developers.google.com/chart/interactive/docs/gallery) in your blog

Version: 0.1.0
Compatible with Hexo Version 5

## install
```bash
$ npm install hexo-tag-gcharts --save
```

## Usage
```
{% gcharts [packageName] [chartType] [width] [height] %}
\\google charts datas goes here
options
\\google charts options goes here
{% endgcharts %}
```
| Name   | Type   | Default | Description                               |
| ------ | ------ | ------- | ----------------------------------------- |
| packageName  | string | corechart    | The name of google chart packages |
| chartType  | string | Bar    | The type of google chart |
| width  | string | 85%     | The width of chart, responsive in window. |
| height | string | 300px   | The height of chart (px)                  |

## Example
### CandlestickChart
[GoogleChart CandlestickChart'page](https://developers.google.com/chart/interactive/docs/gallery/candlestickchart)
#### Google Charts Example
```html
<html>
  <head>
    <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
    <script type="text/javascript">
      google.charts.load('current', {'packages':['corechart']});
      google.charts.setOnLoadCallback(drawChart);

  function drawChart() {
    var data = google.visualization.arrayToDataTable([
      ['Mon', 20, 28, 38, 45],
      ['Tue', 31, 38, 55, 66],
      ['Wed', 50, 55, 77, 80],
      ['Thu', 77, 77, 66, 50],
      ['Fri', 68, 66, 22, 15]
      // Treat first row as data as well.
    ], true);

    var options = {
      legend:'none'
    };

    var chart = new google.visualization.CandlestickChart(document.getElementById('chart_div'));

    chart.draw(data, options);
  }
    </script>
  </head>
  <body>
    <div id="chart_div" style="width: 900px; height: 500px;"></div>
  </body>
</html>
```

packageName : `corechart`
chartType : `CandlestickChart`
data :
```
[
      ['Mon', 20, 28, 38, 45],
      ['Tue', 31, 38, 55, 66],
      ['Wed', 50, 55, 77, 80],
      ['Thu', 77, 77, 66, 50],
      ['Fri', 68, 66, 22, 15]
      // Treat first row as data as well.
    ], true
```
options :
```
{
  legend:'none'
}
```

#### marktdown Usage
```
{% gcharts corechart CandlestickChart '85%' '400px' %}
[
    ['Mon', 20, 28, 38, 45],
    ['Tue', 31, 38, 55, 66],
    ['Wed', 50, 55, 77, 80],
    ['Thu', 77, 77, 66, 50],
    ['Fri', 68, 66, 22, 15]
], true
options
{
  legend:'none'
}
{% endgcharts %}
```

For more details, visit [Demo](https://skyksit.com/hexo/hexo-use-google-charts/) here.

* I used a clone of [hexo-tag-googlecharts](https://github.com/juampi92/hexo-tag-googlecharts)

---
_Source: https://npm.io/package/hexo-tag-gcharts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
