-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
"calendars" component #1230
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
"calendars" component #1230
Changes from 1 commit
3143099
5984106
03ab34f
db3d18b
05b2f96
61ecd42
68af287
cb2c54b
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 |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
'use strict'; | ||
|
||
var Lib = require('../../lib'); | ||
var Registry = require('../../registry'); | ||
var Color = require('../../components/color'); | ||
|
||
var attributes = require('./attributes'); | ||
|
@@ -33,9 +34,8 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout | |
return; | ||
} | ||
|
||
var dfltCalendar = layout.calendar; | ||
coerce('xcalendar', dfltCalendar); | ||
coerce('ycalendar', dfltCalendar); | ||
var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults'); | ||
handleCalendarDefaults(traceIn, traceOut, ['x', 'y'], layout); | ||
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. a little ugly, but |
||
|
||
coerce('orientation', defaultOrientation); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
|
||
'use strict'; | ||
|
||
var Registry = require('../../registry'); | ||
var Lib = require('../../lib'); | ||
var Color = require('../../components/color'); | ||
|
||
|
@@ -26,6 +27,9 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout | |
var x = coerce('x'), | ||
y = coerce('y'); | ||
|
||
var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults'); | ||
handleCalendarDefaults(traceIn, traceOut, ['x', 'y'], layout); | ||
|
||
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. previously we coerced calendars after the return on no data - was it intentional to move this up? 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. Oops. My bad. 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. done in cb2c54b |
||
coerce('text'); | ||
|
||
var orientation = coerce('orientation', (y && !x) ? 'h' : 'v'), | ||
|
@@ -36,10 +40,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout | |
return; | ||
} | ||
|
||
var dfltCalendar = layout.calendar; | ||
coerce('xcalendar', dfltCalendar); | ||
coerce('ycalendar', dfltCalendar); | ||
|
||
var hasAggregationData = traceOut[orientation === 'h' ? 'x' : 'y']; | ||
if(hasAggregationData) coerce('histfunc'); | ||
|
||
|
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.
no need for a
calendar
valType anymore!