{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "definitions": {
        "ContainerChartLine": {
            "properties": {
                "color": {
                    "description": "Color of the line base (default is `#d3d3d3`).",
                    "type": "string"
                },
                "data": {
                    "description": "Array of line items.",
                    "items": {
                        "$ref": "#/definitions/ContainerChartLineData"
                    },
                    "type": "array"
                },
                "label": {
                    "description": "Label of the line base.",
                    "type": "string"
                },
                "style": {
                    "description": "Custom CSS styles of the label.",
                    "type": "string"
                }
            },
            "required": [
                "color",
                "data",
                "label"
            ],
            "type": "object"
        },
        "ContainerChartLineData": {
            "properties": {
                "color": {
                    "description": "Color of the line item.",
                    "type": "string"
                },
                "label": {
                    "description": "Label of the line item.",
                    "type": "string"
                },
                "style": {
                    "description": "Custom CSS styles of the label.",
                    "type": "string"
                },
                "tooltip": {
                    "description": "Tooltip of the line item.",
                    "type": "string"
                },
                "value": {
                    "description": "Value of the line item.",
                    "type": "number"
                }
            },
            "required": [
                "color",
                "label",
                "value"
            ],
            "type": "object"
        }
    },
    "description": "# drayman-claviz-charts\n\nCharts powered by [claviz-charts](https://github.com/Claviz/claviz-charts) library.\n\n## Example of usage\n\n![](media://drayman-claviz-charts.gif)\n\n```typescript\nmodule.exports = async ({ forceUpdate }) => {\n\n     let selected: { value: number; label: string; };\n\n     return () => {\n         const onClick = async (data) => {\n             selected = data;\n             await forceUpdate();\n         }\n\n         const options: DraymanClavizCharts = {\n             data: [\n                 {\n                     color: 'black',\n                     label: 'Fruits',\n                     data: [\n                         {\n                             value: 10,\n                             label: 'Apples',\n                             color: 'green'\n                         },\n                         {\n                             value: 5,\n                             label: 'Oranges',\n                             color: 'orange'\n                         }\n                     ]\n                 },\n                 {\n                     color: 'black',\n                     label: 'Vegetables',\n                     data: [\n                         {\n                             value: 12,\n                             label: 'Tomatoes',\n                             color: 'red'\n                         },\n                     ]\n                 }\n             ],\n             onClick,\n         }\n\n         return [\n             <drayman-claviz-charts key=\"chart\" {...options} style={{ height: '200px' }} />,\n             selected &&\n             <html key=\"info\">\n                 <p>You have selected {selected.value} {selected.label}!</p>\n             </html>\n         ]\n     }\n}\n```",
    "properties": {
        "data": {
            "description": "Array of data to display.",
            "items": {
                "$ref": "#/definitions/ContainerChartLine"
            },
            "type": "array"
        },
        "onClick": {
            "description": "Function that will be executed when user clicks a chart element.",
            "type": "object"
        },
        "orientation": {
            "description": "`horizontal` by default.",
            "enum": [
                "horizontal",
                "vertical"
            ],
            "type": "string"
        },
        "padding": {
            "description": "Padding in `px` between chart elements. `15` by default.",
            "type": "number"
        },
        "reversed": {
            "description": "`false` by default. Determines location of the line base",
            "type": "boolean"
        },
        "verticalTextTopDown": {
            "description": "`false` by default. Change text orientation to top-down when it is positioned vertically.",
            "type": "boolean"
        }
    },
    "required": [
        "data"
    ],
    "type": "object"
}

