Skip to content

Commit

Permalink
Some features were added
Browse files Browse the repository at this point in the history
  • Loading branch information
mahdis-z committed Apr 23, 2019
1 parent 0153473 commit 48fae90
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 9 deletions.
10 changes: 3 additions & 7 deletions _posts/plotly_js/basic/waterfall/2015-04-09-basic-bar.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,14 @@
-20,
0
],
base: 1000,
connector: {
line: {
color: "rgb(63, 63, 63)"
color: "rgb(63, 63, 63)"
}
},
}
];
var layout= {
layout = {
title: {
text: "Profit and loss statement 2018"
},
Expand All @@ -64,10 +63,7 @@
yaxis: {
type: "linear"
},
height: 800,
width: 800,
autosize: true,
showlegend: true
};

Plotly.newPlot(gd, data, layout)
Plotly.newPlot(gd, data, layout);
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@
type: "linear"
},
margin: { l: 150 },
height: 800,
width: 800,
showlegend: true
}
Plotly.newPlot(gd, data, layout);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
}
];
layout = {
waterfallgroupgap : {type: 1},
xaxis: {
title: "MULTI-CATEGORY",
tickfont: {size: 16},
Expand Down
35 changes: 35 additions & 0 deletions _posts/plotly_js/basic/waterfall/2015-04-09-style-waterfall.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Style Waterfall Chart
plot_url: https://codepen.io/plotly/embed/GLXVvM/?height=500&theme-id=15263&default-tab=result
language: plotly_js
suite: waterfall
order: 4
sitemap: false
arrangement: horizontal
---
var gd = document.getElementById('graphDiv');
var data = [
{
type: "waterfall",
x: [
["2016", "2017", "2017", "2017", "2017", "2018", "2018", "2018", "2018"],
["initial", "q1", "q2", "q3", "total", "q1", "q2", "q3", "total" ]
],
measure: ["absolute", "relative", "relative", "relative", "total", "relative", "relative", "relative", "total"],
y: [10, 20, 30, -10, null, 10, 20, -40, null],
base: 300,
decreasing: { marker: { color: "Maroon" , line:{color : "red", width :2}}},
increasing: { marker: { color: "Teal"} },
totals: { marker: { color: "deep sky blue", line:{color:'blue',width:3}} }
}];
layout = {title: {
text: "Profit and loss statement"
},
waterfallgroupgap : {type: 1},
xaxis: {
title: "",
tickfont: {size: 15},
ticks: "outside"
}
}
Plotly.newPlot(gd, data, layout);

0 comments on commit 48fae90

Please sign in to comment.