import {
    Chart,
    Interval,
    Axis
} from '@antv/f2';

import {
    jsx as _jsx
} from "@antv/f2/jsx-runtime";
import {
    jsxs as _jsxs
} from "@antv/f2/jsx-runtime";

export default (({
    data
}) => {
    return _jsxs(Chart, {
        data,
        scale: {
            tem: {
                tickCount: 5,
            },
        },
        children: [
            _jsx(Axis, {
                field: "value",
                tickCount: 12
            }),
            _jsx(Axis, {
                field: "label"
            }),
            _jsx(Interval, {
                x: "label",
                y: "value",
                color: "value",
                adjust: "dodge",
                style: {
                    field: 'value',
                    radius: (val) => {
                        return val > 0 ? [4, 4, 0, 0] : [0, 0, 4, 4];
                    },
                }
            })
        ]
    });
});