{
  "meta": {
    "version": "4.000.9103",
    "fileFormatVersion": "0.4",
    "date": "2024-12-02T20:30:08.062Z",
    "name": "stack-bar-chart-js",
    "description": "Stack-bar chart with Plotly library",
    "groupName": "JavaScript",
    "tags": [
      {
        "text": "Widgets"
      },
      {
        "text": "Plots"
      },
      {
        "text": "Plotly"
      },
      {
        "text": "Bar"
      },
      {
        "text": "Stack-bar"
      }
    ],
    "schedulerLogOff": true
  },
  "data": {
    "datanodes": [
      {
        "name": "data",
        "type": "JSON_formula_plugin",
        "settings": {
          "name": "data",
          "json_var_formula": "var trace1 = {\n  x: [2015, 2016, 2017],\n  BHEVs: [247482, 409000, 652000],\n};\n\nvar trace2 = {\n  x: [2015, 2016, 2017],\n  PHEVs: [83610, 98000, 125000],\n};\n\nvar data = [trace1, trace2];\n\nreturn data;",
          "autoStart": true,
          "explicitTrig": false
        }
      }
    ]
  },
  "libraries": {
    "pyodideStandard": [],
    "pyodideMicropip": []
  },
  "dashboard": {
    "plotlyBarK": {
      "layout": {
        "top": 85,
        "left": 14,
        "height": 353,
        "width": 842,
        "z-index": "1"
      },
      "container": {
        "instanceId": "plotlyBarK",
        "modelJsonId": "plotlyBar"
      },
      "modelParameters": {
        "numberOfAxis": 2,
        "layout": {
          "paper_bgcolor": "rgba(0, 0, 0, 0)",
          "plot_bgcolor": "rgba(0, 0, 0, 0)",
          "colorway": [
            "var(--widget-color-2)",
            "var(--widget-color-5)",
            "var(--widget-color-6)",
            "var(--widget-color-7)",
            "var(--widget-color-8)",
            "var(--widget-color-9)",
            "var(--widget-color-10)",
            "var(--widget-color-11)",
            "var(--widget-color-12)",
            "var(--widget-color-13)"
          ],
          "legend": {
            "font": {
              "color": "var(--widget-color)"
            }
          },
          "title": "Sales of NEVs in China by years",
          "barmode": "stack",
          "xaxis": {
            "title": {
              "text": "year"
            },
            "tickfont": {
              "color": "var(--widget-color)"
            },
            "type": "category",
            "range": [
              -0.5,
              2.5
            ],
            "autorange": true
          },
          "yaxis": {
            "title": {
              "text": "units"
            },
            "tickfont": {
              "color": "var(--widget-color)"
            },
            "type": "linear",
            "range": [
              0,
              817894.7368421053
            ],
            "autorange": true
          },
          "showlegend": true,
          "margin": {
            "l": 70,
            "r": 50,
            "b": 100,
            "t": 100,
            "pad": 4
          },
          "autosize": true
        },
        "hideModeBar": false,
        "showWidget": true,
        "enableWidget": true
      },
      "modelHiddenParams": {
        "numberOfAxis": 1,
        "layout": {
          "paper_bgcolor": "rgba(0,0,0,0)",
          "plot_bgcolor": "rgba(0,0,0,0)",
          "font": {
            "color": "var(--widget-color)"
          },
          "colorway": [
            "var(--widget-color-2)",
            "var(--widget-color-5)",
            "var(--widget-color-6)",
            "var(--widget-color-7)",
            "var(--widget-color-8)",
            "var(--widget-color-9)",
            "var(--widget-color-10)",
            "var(--widget-color-11)",
            "var(--widget-color-12)",
            "var(--widget-color-13)"
          ],
          "legend": {
            "font": {
              "color": "var(--widget-color)"
            }
          },
          "title": "",
          "barmode": "group",
          "xaxis": {
            "title": "x",
            "color": "var(--widget-color)",
            "tickfont": {
              "color": "var(--widget-color)"
            }
          },
          "yaxis": {
            "title": "y",
            "color": "var(--widget-color)",
            "tickfont": {
              "color": "var(--widget-color)"
            }
          },
          "showlegend": false,
          "margin": {
            "l": 50,
            "r": 50,
            "b": 100,
            "t": 100,
            "pad": 4
          }
        },
        "hideModeBar": false,
        "data": [
          {
            "type": "bar",
            "x": [
              "first",
              "second"
            ],
            "y": [
              1,
              2
            ]
          }
        ],
        "selection": [
          {}
        ]
      }
    }
  },
  "connections": {
    "plotlyBarK": {
      "x1": {
        "name": "x1",
        "dataFields": [
          "0",
          "x"
        ],
        "dataNode": "data",
        "dataNodeIndex": 0
      },
      "y1": {
        "name": "y1",
        "dataFields": [
          "0",
          "BHEVs"
        ],
        "dataNode": "data",
        "dataNodeIndex": 0
      },
      "x2": {
        "name": "x2",
        "dataFields": [
          "1",
          "x"
        ],
        "dataNode": "data",
        "dataNodeIndex": 0
      },
      "y2": {
        "name": "y2",
        "dataFields": [
          "1",
          "PHEVs"
        ],
        "dataNode": "data",
        "dataNodeIndex": 0
      }
    }
  },
  "display": {
    "theme": "default",
    "backgroundColor": "var(--widget-color-0)",
    "inheritThemeBackgroundColor": true,
    "marginX": 10,
    "marginY": 10,
    "width": 1294,
    "height": 590,
    "enforceHeightLimit": false
  },
  "navBarNotification": false
}