Skip to content

CannerCMS/victory-canner-components

Repository files navigation

victory-canner-components lerna Storybook

Chart library for Canner, based on Victory Chart.

IMPORTANT NOTE: you need to additionally install victory in your project, because these packages use victory as peerDependencies.

Usage in Canner

You have to use <component/> tag to use charts in Canner. Learn more

<component
  packageName="@canner/victory-area"
  graphql="<your graphql schema>"
  {...custom props}
  />

Common Props

All charts support common props as below

Other than common props, every charts have additional settings for each chart, and is listed in each section below.

Simple Charts

All charts have one props called value. value is the data that send into the chart it's format must followed by the standard data in victory.

Area Chart npm-image

npm i --save @canner/victory-area

Additional Props

Bar Chart npm-image

npm i --save @canner/victory-bar

Additional Props

Donut Chart npm-image

npm i --save @canner/victory-donut

Additional Props

Line Chart npm-image

npm i --save @canner/victory-line

Additional Props

Pie Chart npm-image

npm i --save @canner/victory-pie

Additional Props

Scatter Chart npm-image

npm i --save @canner/victory-scatter

Additional Props

Stack Charts

Regarding to stack charts, the data in stack chart's data is like array[array[object]] data type. It is an array of standard data in victory.

Area Stack Chart npm-image

npm i --save @canner/victory-area-stack

Additional Props

Bar Stack Chart npm-image

npm i --save @canner/victory-bar-stack

Additional Props

License

MIT