-
Notifications
You must be signed in to change notification settings - Fork 7
Updated Gantt datasets and examples to maintain consistency. #229
Conversation
ac81a7f
to
33bf6a3
Compare
@@ -0,0 +1,18 @@ | |||
import { | |||
loadPopup, |
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.
nit: remove the comma to make it one line
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.
Fixed here.
} from '@cerner/terra-graphs-docs/lib/example-datasets/popup'; | ||
|
||
const barTypesDataset2 = { | ||
key: 'track 1', |
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.
nit: keep key and object name similar
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.
@sdadn in Gantt I guess track 1 sounds more meaningful than barTypesDataset.
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.
at the very least, keep the numbers the same
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.
Actually, here track starts from 0 so the number looks a bit different.
const dyanmicData = { | ||
actions: [ | ||
{ | ||
key: 'uid_action_1', | ||
values: [ | ||
new Date(2016, 0, 1, 7, 15).toISOString(), | ||
new Date(2016, 0, 1, 8, 15).toISOString(), | ||
], | ||
}, | ||
{ | ||
key: 'uid_action_2', | ||
values: [new Date(2016, 0, 1, 9, 15).toISOString()], | ||
}, | ||
], | ||
tasks: [ | ||
{ | ||
key: 'task10', | ||
startDate: new Date(2016, 0, 1, 0).toISOString(), | ||
endDate: new Date(2016, 0, 1, 13).toISOString(), | ||
}, | ||
{ | ||
key: 'task11', | ||
startDate: new Date(2016, 0, 1, 15).toISOString(), | ||
endDate: new Date(2016, 0, 1, 20).toISOString(), | ||
}, | ||
], | ||
events: [ | ||
{ | ||
key: 'uid_event_4', | ||
shape: scheduled, | ||
values: [new Date(2016, 0, 1, 2, 15).toISOString()], | ||
}, | ||
], | ||
activities: [ | ||
{ | ||
key: 'activity5', | ||
startDate: new Date(2016, 0, 1, 3).toISOString(), | ||
endDate: new Date(2016, 0, 1, 6).toISOString(), | ||
}, | ||
], | ||
}; |
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.
Since we're only using the properties of dynamicData
and not the object, it would be better to break these into separate variables for actions, tasks, events and activities.
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.
Fixed here.
Summary
Closes #208
JIRA LINK: https://jira2.cerner.com/browse/UXPLATFORM-5480
Deployment Link
https://terra-graphs-deployed-pr-#.herokuapp.com/
Thank you for contributing to Terra.
@cerner/terra
@cerner/carbon