Skip to content

muhraff/dynamic-chart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example

https://muhraff.github.io/dynamic-chart/

Dynamic data chart.js example

Mock data example

./mockdata.json.js

{
  key: 'chart-component', // optional
  settings: {
    theme: 'blue', // grey(default), blue, magenta, green, orange,
    carousel: true, // boolean
    carouselPosition: 'bottom', // top(default) | bottom
    carouselHeight: 30, // number , 30(default)
  },
  data: [
    {
      id: 'e101', // Chart Data ID
      title: {
                text: 'TITLE_TEXT', // string
                color: 'COLOR_CODE' // string
            },
      subTitle: {
                text: 'SUB_SITLE_TEXT', // string
                color: 'COLOR_CODE', // string
            },
      description: {
                text: 'DESCRIPTION_TEXT', // string
                color: 'COLOR_CODE' // string
            },
      isPrimary: true, // true | false
      type: 'bar', // bar | line(default)
      labels: [ ... ],
      datasets: [
        {
          data: [ ... ],
        },
      ],
    },

    ...

    ]
}

Releases

No releases published

Packages

No packages published