packages feed

hvega-0.9.0.0: tests/specs/gallery/label/label4.vl

{
    "$schema": "https://vega.github.io/schema/vega-lite/v4.json",
    "layer": [
        {
            "data": {
                "values": [
                    {
                        "Value": 54.8,
                        "Day": 1
                    },
                    {
                        "Value": 112.1,
                        "Day": 2
                    },
                    {
                        "Value": 63.6,
                        "Day": 3
                    },
                    {
                        "Value": 37.6,
                        "Day": 4
                    },
                    {
                        "Value": 79.7,
                        "Day": 5
                    },
                    {
                        "Value": 137.9,
                        "Day": 6
                    },
                    {
                        "Value": 120.1,
                        "Day": 7
                    },
                    {
                        "Value": 103.3,
                        "Day": 8
                    },
                    {
                        "Value": 394.8,
                        "Day": 9
                    },
                    {
                        "Value": 199.5,
                        "Day": 10
                    },
                    {
                        "Value": 72.3,
                        "Day": 11
                    },
                    {
                        "Value": 51.1,
                        "Day": 12
                    },
                    {
                        "Value": 112,
                        "Day": 13
                    },
                    {
                        "Value": 174.5,
                        "Day": 14
                    },
                    {
                        "Value": 130.5,
                        "Day": 15
                    }
                ]
            },
            "layer": [
                {
                    "mark": "bar",
                    "encoding": {
                        "x": {
                            "field": "Day",
                            "type": "ordinal",
                            "axis": {
                                "labelAngle": 0
                            }
                        },
                        "y": {
                            "field": "Value",
                            "type": "quantitative"
                        }
                    }
                },
                {
                    "transform": [
                        {
                            "filter": "datum.Value >= 300"
                        },
                        {
                            "as": "baseline",
                            "calculate": "300"
                        }
                    ],
                    "mark": "bar",
                    "encoding": {
                        "color": {
                            "value": "#e45755"
                        },
                        "x": {
                            "field": "Day",
                            "type": "ordinal"
                        },
                        "y2": {
                            "field": "Value"
                        },
                        "y": {
                            "field": "baseline",
                            "title": "PM2.5 Value",
                            "type": "quantitative"
                        }
                    }
                }
            ]
        },
        {
            "data": {
                "values": {}
            },
            "layer": [
                {
                    "mark": "rule"
                },
                {
                    "mark": {
                        "dx": -2,
                        "dy": -2,
                        "text": "hazardous",
                        "align": "right",
                        "x": "width",
                        "type": "text",
                        "baseline": "bottom"
                    }
                }
            ],
            "encoding": {
                "y": {
                    "datum": 300
                }
            }
        }
    ],
    "description": "The PM2.5 value of Beijing observed 15 days, highlighting the days when PM2.5 level is hazardous to human health. Data source https://chartaccent.github.io/chartaccent.html"
}