From 2c4536aa9b27f8c134a76e1e24c21628dd4a224f Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Fri, 5 Oct 2018 16:33:02 +0200 Subject: [PATCH 1/3] Fix typos --- _posts/plotly_js/basic/area/2015-04-09-basic-area.html | 2 +- _posts/plotly_js/basic/area/2015-04-09-stacked-area.html | 2 +- .../basic/area/2018-09-18-normalized-stacked-area.html | 2 +- .../basic/bar/2015-08-07-barchart-direct-labels.html | 2 +- .../basic/bar/2017-08-30-barchart-direct-labels-grouped.html | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/_posts/plotly_js/basic/area/2015-04-09-basic-area.html b/_posts/plotly_js/basic/area/2015-04-09-basic-area.html index 980bb5f63418..2844982cd8e6 100755 --- a/_posts/plotly_js/basic/area/2015-04-09-basic-area.html +++ b/_posts/plotly_js/basic/area/2015-04-09-basic-area.html @@ -23,4 +23,4 @@ var data = [trace1, trace2]; -Plotly.newPlot('myDiv', data, layout); +Plotly.newPlot('myDiv', data); diff --git a/_posts/plotly_js/basic/area/2015-04-09-stacked-area.html b/_posts/plotly_js/basic/area/2015-04-09-stacked-area.html index e270557e1418..0140a9dbd8b9 100644 --- a/_posts/plotly_js/basic/area/2015-04-09-stacked-area.html +++ b/_posts/plotly_js/basic/area/2015-04-09-stacked-area.html @@ -14,4 +14,4 @@ {x: [1,2,3], y: [3,0,2], stackgroup: 'one'} ]; -Plotly.newPlot(plotDiv, traces), {title: 'stacked and filled line chart'}); +Plotly.newPlot(plotDiv, traces, {title: 'stacked and filled line chart'}); diff --git a/_posts/plotly_js/basic/area/2018-09-18-normalized-stacked-area.html b/_posts/plotly_js/basic/area/2018-09-18-normalized-stacked-area.html index 98c546c7c593..93f40d7ca16a 100644 --- a/_posts/plotly_js/basic/area/2018-09-18-normalized-stacked-area.html +++ b/_posts/plotly_js/basic/area/2018-09-18-normalized-stacked-area.html @@ -14,5 +14,5 @@ {x: [1,2,3], y: [3,0,2], stackgroup: 'one'} ]; -Plotly.newPlot(stacksDiv, traces, {title: 'Normalized stacked and filled line chart'}); +Plotly.newPlot(plotDiv, traces, {title: 'Normalized stacked and filled line chart'}); diff --git a/_posts/plotly_js/basic/bar/2015-08-07-barchart-direct-labels.html b/_posts/plotly_js/basic/bar/2015-08-07-barchart-direct-labels.html index f50cf7420ac9..316e32f42818 100644 --- a/_posts/plotly_js/basic/bar/2015-08-07-barchart-direct-labels.html +++ b/_posts/plotly_js/basic/bar/2015-08-07-barchart-direct-labels.html @@ -23,7 +23,7 @@ color: 'rgb(158,202,225)', opacity: 0.6, line: { - color: 'rbg(8,48,107)', + color: 'rgb(8,48,107)', width: 1.5 } } diff --git a/_posts/plotly_js/basic/bar/2017-08-30-barchart-direct-labels-grouped.html b/_posts/plotly_js/basic/bar/2017-08-30-barchart-direct-labels-grouped.html index 8820e0932c4e..7b50925fc0e3 100644 --- a/_posts/plotly_js/basic/bar/2017-08-30-barchart-direct-labels-grouped.html +++ b/_posts/plotly_js/basic/bar/2017-08-30-barchart-direct-labels-grouped.html @@ -24,7 +24,7 @@ marker: { color: 'rgb(158,202,225)', line: { - color: 'rbg(8,48,107)', + color: 'rgb(8,48,107)', width: 1.5 } } @@ -40,7 +40,7 @@ marker: { color: 'rgba(58,200,225,.5)', line: { - color: 'rbg(8,48,107)', + color: 'rgb(8,48,107)', width: 1.5 } } From 2075c0a41139cc3c373eff9002e561a3f82f7e77 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Fri, 5 Oct 2018 16:33:23 +0200 Subject: [PATCH 2/3] Reference says text is made of strings --- .../basic/bar/2015-08-07-barchart-direct-labels.html | 2 +- .../basic/bar/2017-08-30-barchart-direct-labels-grouped.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/_posts/plotly_js/basic/bar/2015-08-07-barchart-direct-labels.html b/_posts/plotly_js/basic/bar/2015-08-07-barchart-direct-labels.html index 316e32f42818..39ff7b5237e1 100644 --- a/_posts/plotly_js/basic/bar/2015-08-07-barchart-direct-labels.html +++ b/_posts/plotly_js/basic/bar/2015-08-07-barchart-direct-labels.html @@ -16,7 +16,7 @@ x: xValue, y: yValue, type: 'bar', - text: yValue, + text: yValue.map(String), textposition: 'auto', hoverinfo: 'none', marker: { diff --git a/_posts/plotly_js/basic/bar/2017-08-30-barchart-direct-labels-grouped.html b/_posts/plotly_js/basic/bar/2017-08-30-barchart-direct-labels-grouped.html index 7b50925fc0e3..164a50c149d5 100644 --- a/_posts/plotly_js/basic/bar/2017-08-30-barchart-direct-labels-grouped.html +++ b/_posts/plotly_js/basic/bar/2017-08-30-barchart-direct-labels-grouped.html @@ -17,7 +17,7 @@ x: xValue, y: yValue, type: 'bar', - text: yValue, + text: yValue.map(String), textposition: 'auto', hoverinfo: 'none', opacity: 0.5, @@ -34,7 +34,7 @@ x: xValue, y: yValue2, type: 'bar', - text: yValue2, + text: yValue2.map(String), textposition: 'auto', hoverinfo: 'none', marker: { From ef7ce858e251eb30d345b20e6684c5afc56de674 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Fri, 5 Oct 2018 16:33:48 +0200 Subject: [PATCH 3/3] Make examples runnable --- _posts/plotly_js/basic/bar/2018-02-27-bar-base.html | 4 +++- .../plotly_js/statistical/box/2015-04-09-basic-box-plot.html | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/_posts/plotly_js/basic/bar/2018-02-27-bar-base.html b/_posts/plotly_js/basic/bar/2018-02-27-bar-base.html index cb984c12c9a2..23a498d17463 100644 --- a/_posts/plotly_js/basic/bar/2018-02-27-bar-base.html +++ b/_posts/plotly_js/basic/bar/2018-02-27-bar-base.html @@ -8,7 +8,7 @@ arrangement: horizontal --- -data = [ +var data = [ { type: 'bar', x: ['2016','2017','2018'], @@ -29,3 +29,5 @@ }, name: 'revenue' }] + +Plotly.newPlot('myDiv', data); diff --git a/_posts/plotly_js/statistical/box/2015-04-09-basic-box-plot.html b/_posts/plotly_js/statistical/box/2015-04-09-basic-box-plot.html index 2f9cdfb8e7e2..39b303a120e7 100755 --- a/_posts/plotly_js/statistical/box/2015-04-09-basic-box-plot.html +++ b/_posts/plotly_js/statistical/box/2015-04-09-basic-box-plot.html @@ -7,6 +7,8 @@ order: 1 sitemap: false --- +var y0 = []; +var y1 = []; for (var i = 0; i < 50; i ++) { y0[i] = Math.random(); y1[i] = Math.random() + 1;