How can I show a chart of stack bar with line ? #79
Closed
livia0803
announced in
Announcements
Replies: 1 comment
-
Just solve as below: bar_properties={"y[2]":"1/colA","y[3]":"1/colB"} <|{[A, B]}|chart|type[1]=line|type=bar|properties={bar_properties}|max_width=calc(100% - 100px)|layout={stack_bar_layout}|x=0/shift|y[1]=0/sum|> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
var trace1 = {
x: [0, 1, 2, 3, 4, 5],
y: [1.5, 1, 1.3, 0.7, 0.8, 0.9],
name: 'SF Zoo',
type: 'bar'
};
var trace2 = {
x: [0, 1, 2, 3, 4, 5],
y: [1, 0.5, 0.7, -1.2, 0.3, 0.4],
name: 'LA Zoo',
type: 'bar'
};
var trace3 = {
x: [0, 1, 2, 3, 4, 5],
y: [1.5, 1, 1.3, 0.7, 0.8, 0.9],
type: 'scatter'
};
var data = [trace1, trace2, trace3];
var layout = {barmode: 'stack'};
Plotly.newPlot('myDiv', data, layout);
Beta Was this translation helpful? Give feedback.
All reactions