Stacked area chart - Stacked area chart with based stacking

Stacked area chart with based stacking

keyboard_arrow_leftGo back
Open in JSFiddle
JavaScript
chart= new FacetChart({
    "series": [
        {
            "name": "GDP 2006",
            "data": {
                "field": "2006",
                "aggregation": "sum"
            },
            "style": {
                "fillColor": "#2fc32f",
                "lineColor": "#2fc32f"
            },
            "stack": "default",
            "type": "line"
        },
        {
            "name": "GDP 2007",
            "data": {
                "field": "2007",
                "aggregation": "sum"
            },
            "style": {
                "fillColor": "#b0dc0b",
                "lineColor": "#b0dc0b"
            },
            "stack": "default",
            "type": "line"
        }
    ],
    "stacks": {
        "default": {
            "type": "based"
        }
    },
    "container": "demo",
    "data": [
        {
            "url": "\/data\/us-economy.json"
        }
    ],
    "toolbar": {
        "fullscreen": true,
        "enabled": true
    },
    "interaction": {
        "resizing": {
            "enabled": false
        }
    }
})
HTML
      <script src="https://cdn.zoomcharts-cloud.com/1/latest/zoomcharts.js"></script>
      <div id="demo"></div>
                  
Data