var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
import { jsx as _jsx } from "react/jsx-runtime";
import Preview from 'preview';
import { initChainStyles } from 'config/stylebook';
var LineAppOptions = {
    version: 'widget/v1',
    kind: 'Application',
    metadata: {
        name: 'subscan widget',
    },
    spec: {
        components: [
            {
                id: 'chart0',
                type: 'core/v1/chart',
                properties: {
                    xAxis: [
                        {
                            type: 'category',
                            data: ['Dimension 1', 'Dimension 2', 'Dimension 3'],
                            position: 'bottom',
                        },
                    ],
                    yAxis: [
                        {
                            type: 'value',
                            data: [],
                            position: 'left',
                        },
                    ],
                    series: [
                        {
                            name: 'Series 1',
                            label: {
                                show: false,
                                position: 'top',
                            },
                            data: [1, 2, 10],
                            symbol: 'circle',
                            showSymbol: true,
                            smooth: true,
                            activeAreaStyle: true,
                        },
                        {
                            name: 'Series 2',
                            label: {
                                show: false,
                                position: 'top',
                            },
                            data: [10, 20, 15],
                            symbol: 'circle',
                            showSymbol: true,
                            smooth: true,
                            activeAreaStyle: true,
                        },
                    ],
                    color: [],
                },
                traits: [],
            },
        ],
    },
};
var PieAppOptions = {
    version: 'widget/v1',
    kind: 'Application',
    metadata: {
        name: 'subscan widget',
    },
    spec: {
        components: [
            {
                id: 'chartpie1',
                type: 'core/v1/chartpie',
                properties: {
                    series: {
                        data: [
                            {
                                value: 30,
                                name: 'Validator',
                            },
                            {
                                value: 60,
                                name: 'Nominator',
                            },
                        ],
                    },
                    color: ['#E90979', '#F081B9', '#d7d7d7'],
                },
                traits: [],
            },
        ],
    },
};
export default {
    title: 'Subscan Lib/Chart',
    component: Preview,
};
var Template = function (args) { return _jsx(Preview, __assign({}, args)); };
export var LineChart = Template.bind({});
LineChart.args = __assign({ options: LineAppOptions }, initChainStyles);
export var PieChart = Template.bind({});
PieChart.args = __assign({ options: PieAppOptions }, initChainStyles);
