1.0.3 • Published 5 years ago

creative-infographics v1.0.3

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

⏬ Installation

Creative-Infographics is available as an npm package.

// with npm
npm  install creative-infographics

Usage

For each infographic component there is fixed data schema and reaquired props, see the followed documentation below.

Infographics

1) FlowerGraph

Edit Button

  • Import FlowerGraph
import { FlowerGraph } from "creative-infographics";

Data schema for FlowerGraph

  • following data schema is required to render this infographic.
data /* array_of_objects */ = [
    {
      /* key_for_label */ : /* label */,
      /* key_for_type */ : /* array of distinguished values of string|number */ [ "type_a", "type_b", ...]
      ...
    },
    ...
]
  • component schema
<FlowerGraph data={/* data */} label={/* key name of label */} term={/* key name of type */} />

Props

Using following props, Info-graphic can be customize as per required.

propstypeDefault valuesDescription
dataarray of objects*requiredThis prop requires data as per shown in data schema
labelstring*requiredThis is key name of text label inside objects
termstring*requiredThis is key name of array of types inside objects
leafsinteger5Number of flower leafs
leafRinteger55leafs Radius
leafDeginteger270Round cut off of leafs circle in degree
flowerRinteger195Flower root Radius
flowerDeginteger360Round cut off of Flower circle in degree
flowerRotationinteger0Rotation of Flower
fontSizeinteger6text size
fadingOpacityfloat0.02Opacity of other elements on mouse hover range : 0.0 to 1
luminositystring ("bright" | "dark")"bright""bright" : for white text and bright colors, "dark": for black text and dark colors
tintbool | string(colors_only)falsefalse : random colors, "color_names" : gives shades of colors (red, blue, ..)

License

This project is licensed under the terms of the ISC license.

1.0.3

5 years ago

1.0.2

5 years ago

0.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago