From 8c0aef457d642f99e7490202dc311b706b531ded Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Fri, 28 Jun 2019 10:38:32 -0400 Subject: [PATCH] remove float: left from dc.css fixes #673 --- Changelog.md | 15 +++++++++++++++ package.json | 2 +- style/dc.scss | 6 +----- web/css/dc-floatleft.css | 3 +++ web/ep/index.html | 1 + web/examples/adjustable-threshold.html | 1 + web/examples/boxplot-basic.html | 1 + web/examples/boxplot-enhanced.html | 1 + web/examples/boxplot-render-data.html | 1 + web/examples/boxplot-time.html | 1 + web/examples/cbox-menu.html | 1 + web/examples/complex-reduce.html | 1 + web/examples/composite-brush-multi-dim.html | 1 + web/examples/download-table.html | 1 + web/examples/filter-stacks.html | 1 + web/examples/filtering-removing.html | 1 + web/examples/filtering.html | 1 + web/examples/html-legend.html | 1 + web/examples/multi-focus.html | 1 + web/examples/scatter-brushing.html | 1 + web/examples/select.html | 1 + web/examples/sunburst-cat.html | 1 + web/examples/sunburst.html | 1 + web/examples/time-intervals.html | 1 + web/index.html | 3 +++ web/resizing/resizing-scatter-brushing.html | 1 + 26 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 web/css/dc-floatleft.css diff --git a/Changelog.md b/Changelog.md index f235b4e84..91cca61ca 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,18 @@ +## 3.1.0 +* Remove `float: left` from dc.css; add it to individual examples where needed. + +It's not appropriate to set this in the library, because charts will be used in all sorts of different layouts, and this sometimes required people to use `div.dc-chart { float: none!important; }` which is horrible. ([#673](https://github.com/dc-js/dc.js/issues/673)) + +Fixing this will break a lot of dashboard layouts, thus the version bump. Add + +```css +div.dc-chart { + float: left; +} +``` + +to your page CSS to restore the old layout! + ## 3.0.13 * Keep track of individual values efficiently in boxplot examples ([#543](https://github.com/dc-js/dc.js/issues/543)) * Series progression [example](https://dc-js.github.io/dc.js/transitions/series-progression.html) diff --git a/package.json b/package.json index 7c1b22189..9c8becb11 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dc", - "version": "3.0.13", + "version": "3.1.0", "license": "Apache-2.0", "copyright": "2019", "description": "A multi-dimensional charting library built to work natively with crossfilter and rendered using d3.js ", diff --git a/style/dc.scss b/style/dc.scss index 65643f396..7d84c58e6 100644 --- a/style/dc.scss +++ b/style/dc.scss @@ -29,10 +29,6 @@ $font_sans_serif: sans-serif; stroke-opacity: 0.5; } -div.dc-chart { - float: left; -} - .dc-chart { rect { &.bar { @@ -320,4 +316,4 @@ div.dc-html-legend { .dc-html-legend-container{ height: inherit; -} \ No newline at end of file +} diff --git a/web/css/dc-floatleft.css b/web/css/dc-floatleft.css new file mode 100644 index 000000000..04d2d479d --- /dev/null +++ b/web/css/dc-floatleft.css @@ -0,0 +1,3 @@ +div.dc-chart { + float: left; +} diff --git a/web/ep/index.html b/web/ep/index.html index c8400c073..548bd3881 100644 --- a/web/ep/index.html +++ b/web/ep/index.html @@ -5,6 +5,7 @@ dc.js - data grid example + diff --git a/web/examples/adjustable-threshold.html b/web/examples/adjustable-threshold.html index 58a4a8c89..f45418fa3 100644 --- a/web/examples/adjustable-threshold.html +++ b/web/examples/adjustable-threshold.html @@ -3,6 +3,7 @@ dc.js - Adjustable Threshold Example + diff --git a/web/examples/boxplot-basic.html b/web/examples/boxplot-basic.html index 96ab16730..317b9203b 100644 --- a/web/examples/boxplot-basic.html +++ b/web/examples/boxplot-basic.html @@ -5,6 +5,7 @@ + diff --git a/web/examples/boxplot-enhanced.html b/web/examples/boxplot-enhanced.html index 55b5f41e3..711125aed 100644 --- a/web/examples/boxplot-enhanced.html +++ b/web/examples/boxplot-enhanced.html @@ -5,6 +5,7 @@ + diff --git a/web/examples/boxplot-render-data.html b/web/examples/boxplot-render-data.html index 9db20d8d4..1635548dd 100644 --- a/web/examples/boxplot-render-data.html +++ b/web/examples/boxplot-render-data.html @@ -5,6 +5,7 @@ + diff --git a/web/examples/boxplot-time.html b/web/examples/boxplot-time.html index c0f1c4867..558d32d8d 100644 --- a/web/examples/boxplot-time.html +++ b/web/examples/boxplot-time.html @@ -5,6 +5,7 @@ + diff --git a/web/examples/cbox-menu.html b/web/examples/cbox-menu.html index 6eaf4766e..51ca718bc 100644 --- a/web/examples/cbox-menu.html +++ b/web/examples/cbox-menu.html @@ -5,6 +5,7 @@ + diff --git a/web/examples/complex-reduce.html b/web/examples/complex-reduce.html index 430bc69b8..722725325 100644 --- a/web/examples/complex-reduce.html +++ b/web/examples/complex-reduce.html @@ -5,6 +5,7 @@ +