-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Changes from 1 commit
36968ad
ab6c109
19d81d4
aa84cf0
b5e8301
80c75c7
f25213d
ef64e20
26494cf
da47cd4
da71911
ab27021
de5e6b3
e976877
3fde2f8
121231b
8c839a1
48b5c50
4c7c99d
b198529
17c8377
0d20931
b9e388f
a5e6aaa
86331c7
c9f76ab
574a6b3
beb239b
ec0771a
dd4880b
2264bdd
f11aef9
8b4340e
053be81
f49dd51
fb056b1
b2988b4
3a812c9
1ca424a
a671683
1042f4f
46f4a20
616d77d
86a3167
4318f45
f025dc6
ade535e
49507be
c95b45a
6a68155
1275935
6c3a9d7
6da24e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
var Plotly = require('@lib/index'); | ||
var Lib = require('@src/lib'); | ||
|
||
|
||
describe('plot schema', function() { | ||
'use strict'; | ||
|
||
|
@@ -112,17 +113,31 @@ describe('plot schema', function() { | |
expect(list).toEqual(astrs); | ||
}); | ||
|
||
it('layout.annotations and layout.shapes should contain `items`', function() { | ||
var astrs = ['annotations', 'shapes']; | ||
it('should convert _isLinkedToArray attributes to items object', function() { | ||
var astrs = [ | ||
'annotations', 'shapes', | ||
'xaxis.rangeselector.buttons', 'yaxis.rangeselector.buttons' | ||
]; | ||
|
||
astrs.forEach(function(astr) { | ||
expect( | ||
isPlainObject( | ||
Lib.nestedProperty( | ||
plotSchema.layout.layoutAttributes, astr | ||
).get().items | ||
) | ||
).toBe(true); | ||
var np = Lib.nestedProperty( | ||
plotSchema.layout.layoutAttributes, astr | ||
); | ||
|
||
var name = np.parts[np.parts.length - 1], | ||
itemName = name.substr(0, name.length - 1); | ||
|
||
var itemsObj = np.get().items, | ||
itemObj = itemsObj[itemName]; | ||
|
||
expect(isPlainObject(itemsObj)).toBe(true); | ||
expect(itemsObj.role).toBeUndefined(); | ||
expect(Object.keys(itemsObj).length).toEqual(1); | ||
expect(isPlainObject(itemObj)).toBe(true); | ||
expect(itemObj.role).toBe('object'); | ||
|
||
var role = np.get().role; | ||
expect(role).toEqual('object'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @cldougl @theengineear ⏫ needs to be satisfied for plotly.py to build to correct graph object. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @delekru https://github.com/delekru @etpinard @chriddyp On Fri, Apr 1, 2016 at 4:20 PM, Étienne Tétreault-Pinard <
|
||
}); | ||
}); | ||
|
||
|
@@ -158,4 +173,5 @@ describe('plot schema', function() { | |
} | ||
); | ||
}); | ||
|
||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An important distinction here.
With
backward
, the starting pt (i.erange[0]
) goes back(count * step)
in ms.With
to date
, the starting pt (i.erange[0]
) goes back to the floor of(count * step)
.For example, with
the starting range value is
Jan 01
of the last year in the time series.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we go for
to date
ortodate
? Other attributes (tozeroy
for example) are stripped of whitespace.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would vote
todate
for consistency (i.e. w/tozero-
)