0.5.0 • Published 4 years ago

claviz-charts v0.5.0

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

Claviz Charts

Container chart DEMO

const parentElement = document.getElementById('chart');
const options = {
    data: [
        {
            "data": [
                {
                    "color": "#7bc043",
                    "label": "Apples",
                    "value": 2,
                    "tooltip": "Custom tooltip"
                }
            ],
            "label": "line 1"
        },
        {
            "data": [],
            "label": "line 2"
        },
        {
            "data": [
                {
                    "color": "#f37736",
                    "label": "Oranges",
                    "value": 10
                }
            ],
            "label": "line 3"
        },
    ]
};
generateContainerChart(parentElement, options);

Options

  • data object[] required\ Array of data to display.

    • label string\ Label of the line base.
    • color string\ Color of the line base (default is #d3d3d3).
    • style string\ Custom CSS styles of the label.
    • data object[]\ Array of line data.
      • color string
      • label string
      • value number
      • tooltip string
      • style string
  • padding number\ Padding in px between chart elements. 15 by default.

  • orientation horizontal | vertical\ horizontal by default.

  • reversed boolean\ false by default. Determines location of the line base:

reversedhorizontalvertical
falselefttop
truerightbottom
  • select function(data)\ Function that will be executed when user clicks on chart element.

  • verticalTextTopDown boolean\ false by default. Change text orientation to top-down when it is positioned vertically.

0.5.0

4 years ago

0.4.1

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.0

5 years ago

0.1.0

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago