2.0.1 • Published 4 years ago

@chameleon-ds/chart v2.0.1

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

Chameleon Chart

import { html } from "@open-wc/demoing-storybook";
import { withKnobs, text, number } from "@open-wc/demoing-storybook";
import "./chameleon-chart.js";

export default {
  title: "Components|Data and Visualizations/Chart",
  component: "chameleon-chart",
  decorators: [withKnobs],
  options: { selectedPanel: "storybookjs/docs/panel" },
};

Properties

Property NameType(s)Default ValueDescription
typeString""The type of chart
colorString"#00870a"The hex value of the chart color
percentageNumber0The percentage to be displayed in the chart
labelString"0"The value to show in the label
subLabelString""The value to show in the sublabel

Examples

Default

export const Default = () => {
  const color = text("Color", "#00870a");
  const label = text("Label", "1,000");
  const subLabel = text("SubLabel", "Funds Remaining");
  const percentage = number("Percentage", 90);

  return html`
    <chameleon-chart
      color="${color}"
      percentage="${percentage}"
      label="${label}"
      subLabel="${subLabel}"
      type="arc"
    ></chameleon-chart>
  `;
};
2.0.1

4 years ago

2.0.0

4 years ago

1.0.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago