packages feed

hvega-0.7.0.1: tests/specs/gallery/bar/barnegative.vl

{
    "mark": "bar",
    "data": {
        "values": [
            {
                "a": "A",
                "b": -28
            },
            {
                "a": "B",
                "b": 55
            },
            {
                "a": "C",
                "b": -33
            },
            {
                "a": "D",
                "b": 91
            },
            {
                "a": "E",
                "b": 81
            },
            {
                "a": "F",
                "b": 53
            },
            {
                "a": "G",
                "b": -19
            },
            {
                "a": "H",
                "b": 87
            },
            {
                "a": "I",
                "b": 52
            }
        ]
    },
    "$schema": "https://vega.github.io/schema/vega-lite/v4.json",
    "encoding": {
        "x": {
            "field": "a",
            "type": "ordinal",
            "axis": {
                "labelAngle": 0,
                "domain": false,
                "labelPadding": 4,
                "ticks": false
            }
        },
        "y": {
            "field": "b",
            "type": "quantitative",
            "axis": {
                "gridColor": {
                    "value": "#ddd",
                    "condition": {
                        "value": "black",
                        "test": "datum.value === 0"
                    }
                }
            }
        }
    },
    "description": "A bar chart with negative values. We can hide the axis domain line, and instead use a conditional grid color to draw a zero baseline."
}