Skip to content

Create charts using attribute data for the SilverBullet markdown platform.

Notifications You must be signed in to change notification settings

vuau/silverbullet-plug-attribute-chart

Repository files navigation

SilverBullet plug: attribute chart

This plug allows you to create a chart (using Chart.js) from attribute data.

Widget example:

```attributeChart  
query:  
  page where name =~ /^Journal\/Day\// 
attributes:  
  - name: hoursOfExercise  
    type: line  
    label: Hours Of Exercise
  - name: mood  
    type: line
    label: Mood Score
```

LvXflvwEuJ

You can also pass options to the chart:

```attributeChart
  query:
    page where name =~ /^Journal\/Day\//
  attributes:
    - name: goodHabit1
      type: bar
      color: green
    - name: goodHabit2
      type: bar
      color: green
    - name: badHabit1
      type: bar
      color: red
    - name: badHabit2
      type: bar
      color: red
  options:
    x:
      stacked: true
    y:
      stacked: true
      ticks:
        stepSize: 1
    scales:
      y:
        min: -10
        max: 10
```

image

Install this plug: run command "Plug: Add" and add the following URL

github:vuau/silverbullet-plug-attribute-chart/attributeChart.plug.js

then, run Plugs: Update command.

About

Create charts using attribute data for the SilverBullet markdown platform.

Topics

Resources

Stars

Watchers

Forks