Skip to content

Block chart

Sébastien Moulène edited this page May 15, 2023 · 3 revisions

Displays a chart

HTML

https://github.com/hugolify/hugolify-theme/blob/main/layouts/partials/blocks/templates/chart.html

SASS

https://github.com/hugolify/hugolify-theme/blob/main/assets/sass/components/blocks/_chart.sass

Frontmatter

blocks:
  - type: chart
    heading: ""
      surtitle: ""
      title: ""
      text: ""
    grid: ""
    chart:
      type: ""
      title: ""
      backgroundColor: ""
      borderColor: ""
      items:
        label: ""
        value: ""
        color: ""
      data:
        json: ""
    background: false

Netlify CMS

  • Chart object
    • heading object
      • surtitle string
      • title string
      • text string
    • grid select [small, medium, large, full]
    • chart object
      • type select [bar, line, pie, polarArea, radar]
      • title string
      • backgroundColor color
      • borderColor color
      • items list
        • label string
        • value number
        • color color
      • data code
        • json string
    • background boolean