8000 Feature: Range selectors by etpinard · Pull Request #373 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Feature: Range selectors #373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 53 commits into from
Apr 4, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
36968ad
first pass range selector attributes
etpinard Mar 11, 2016
ab6c109
first pass range selector defaults
etpinard Mar 11, 2016
19d81d4
first pass range selector draw method
etpinard Mar 11, 2016
aa84cf0
add 'buttons' to list of non-data array in the plot-schema
etpinard Mar 11, 2016
b5e8301
ensure that range selector attributes are only coerced for date axes
etpinard Mar 14, 2016
80c75c7
pull off update object logic into seperate file:
etpinard Mar 14, 2016
f25213d
put range selector on-par with legend's
etpinard Mar 16, 2016
ef64e20
move RangeSelector.draw to just after Legend.draw
etpinard Mar 17, 2016
26494cf
make range selector border width dflt 1
etpinard Mar 17, 2016
da47cd4
tmp commit (range selector draw)
etpinard Mar 17, 2016
da71911
make range selector module more like range slider:
etpinard Mar 30, 2016
ab27021
first pass range selector attributes
etpinard Mar 11, 2016
de5e6b3
first pass range selector defaults
etpinard Mar 11, 2016
e976877
first pass range selector draw method
etpinard Mar 11, 2016
3fde2f8
add 'buttons' to list of non-data array in the plot-schema
etpinard Mar 11, 2016
121231b
ensure that range selector attributes are only coerced for date axes
etpinard Mar 14, 2016
8c839a1
pull off update object logic into seperate file:
etpinard Mar 14, 2016
48b5c50
put range selector on-par with legend's
etpinard Mar 16, 2016
4c7c99d
move RangeSelector.draw to just after Legend.draw
etpinard Mar 17, 2016
b198529
make range selector border width dflt 1
etpinard Mar 17, 2016
17c8377
tmp commit (range selector draw)
etpinard Mar 17, 2016
0d20931
make range selector module more like range slider:
etpinard Mar 30, 2016
b9e388f
better text positioning in range-select buttons
mdtusz Mar 30, 2016
a5e6aaa
Merge branch 'range-selector' of https://github.com/plotly/plotly.js …
mdtusz Mar 30, 2016
86331c7
lint in Plots.autoMargin
etpinard Mar 31, 2016
c9f76ab
add positionning logic to range selector draw step
etpinard Mar 31, 2016
574a6b3
change default yanchor to 'bottom'
etpinard Mar 31, 2016
beb239b
fixup test description
etpinard Mar 31, 2016
ec0771a
use new Date() to def specs instead of ms:
etpinard Mar 31, 2016
dd4880b
make y position 1.02 by default
etpinard Mar 31, 2016
2264bdd
add 'hour', 'minute' and 'second' button step values
etpinard Mar 31, 2016
f11aef9
Update rangeselector attributes
mdtusz Mar 31, 2016
8b4340e
don't coerce 'stepmode' and 'count' when 'step' is set to 'all'
etpinard Mar 31, 2016
053be81
handle to-date with step > 1 case
etpinard Mar 31, 2016
f49dd51
handle step 'all' case in label text
etpinard Mar 31, 2016
fb056b1
add range selector image mock
etpinard Mar 31, 2016
b2988b4
add a few range selector interaction tests
etpinard Mar 31, 2016
3a812c9
make getUpdateObject use ax._name to build update object
etpinard Mar 31, 2016
1ca424a
fixup test (to accomodate new defaults)
etpinard Mar 31, 2016
a671683
add smart default for range selector 'x' and 'y':
etpinard Mar 31, 2016
1042f4f
get range selector attributes ready for plot schema:
etpinard Apr 1, 2016
46f4a20
add comment about plotly.py in isLinkedToArray plot schema test
etpinard Apr 1, 2016
616d77d
add 'rx' and 'ry' button rect radii
etpinard Apr 1, 2016
86a3167
pass axis name to Plots.autoMargin,
etpinard Apr 1, 2016
4318f45
fix default label text generator
etpinard Apr 1, 2016
f025dc6
add is-active and is-hovered dynamic props to buttons:
etpinard Apr 1, 2016
ade535e
fixup attribute descriptions
etpinard Apr 1, 2016
49507be
change range selector and slider 'borderwidth' dflt to 0.
etpinard Apr 1, 2016
c95b45a
update range selector image test + add one more
etpinard Apr 1, 2016
6a68155
add is-active button update test
etpinard Apr 1, 2016
1275935
rename 'to date' stepmode 'todate'
etpinard Apr 4, 2016
6c3a9d7
update image mock 'to date' -> 'todate'
etpinard Apr 4, 2016
6da24e4
update default button style:
etpinard Apr 4, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
put range selector on-par with legend's
  • Loading branch information
etpinard committed Mar 30, 2016
commit f25213dbb7aca998e3b7181491e05ea755b9711a
1 change: 1 addition & 0 deletions src/components/range_selector/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ var colorAttrs = require('../color/attributes');
var extendFlat = require('../../lib/extend').extendFlat;
var buttonAttrs = require('./button_attributes');


module.exports = {
visible: {
valType: 'boolean',
Expand Down
11 changes: 5 additions & 6 deletions src/components/range_selector/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,19 @@ module.exports = function rangeSelectorDefaults(containerIn, containerOut, layou

var buttons = buttonsDefaults(selectorIn, selectorOut);

var visible = coerce('visible', !!buttons.length);
var visible = coerce('visible', buttons.length > 0);
if(!visible) return;

coerce('x');
coerce('xanchor');
coerce('y');
coerce('yanchor');
Lib.noneOrAll(containerIn, containerOut, ['x', 'y']);

// coerce('width');
// coerce('height');
coerce('xanchor');
coerce('yanchor');

Lib.coerceFont(coerce, 'font', layout.font);

coerce('bgcolor');
coerce('bgcolor', layout.paper_bgcolor);
coerce('bordercolor');
coerce('borderwidth');
};
Expand Down
0