-
Notifications
You must be signed in to change notification settings - Fork 7
Updated General examples to maintain consistency #247
Conversation
@@ -0,0 +1,25 @@ | |||
import Carbon from '@cerner/carbon-graphs/lib/js/carbon'; |
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.
Instead of dataset2, can you name this something related to examples.( Probably do the same for other datasets).
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 used a generic name because it's used in multiple examples
// const tickValues = [ | ||
// new Date(2016, 0, 1, 1, 0).toISOString(), | ||
// new Date(2016, 0, 1, 5, 0).toISOString(), | ||
// new Date(2016, 0, 1, 10, 0).toISOString(), | ||
// new Date(2016, 0, 1, 15, 0).toISOString(), | ||
// new Date(2016, 0, 1, 20, 0).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.
Remove comments here.
const graphConfig = utils.deepClone(getGraphConfig('#xAxisAlternateLocale')); | ||
// graphConfig.locale = Carbon.helpers.LOCALE.de_DE; | ||
// graphConfig.axis.x.ticks = { | ||
// values: tickValues, | ||
// format: '%A %e %B %Y, %X', | ||
// }; |
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.
Remove comments.
// new Date(2016, 0, 1, 10, 0).toISOString(), | ||
// new Date(2016, 0, 1, 15, 0).toISOString(), | ||
// new Date(2016, 0, 1, 20, 0).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.
Remove comments. Looks like there are comments in other places too, please remove all of them if not necessary.
x: { | ||
type: Carbon.helpers.AXIS_TYPE.TIME_SERIES, | ||
label: 'Datetime', | ||
lowerLimit: new Date(2016, 0, 1, 1, 0).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.
Is the intention for the lower limit to be the beginning of the day? If so should the hour in the date be 0 since it is 0-based? Same for the other examples if update is needed.
new Date(2016, 0, 1, 0, 0).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.
fixed here: 16ddba7
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.
Do the other examples also need to be updated?
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 the remaining datasets here: 73c5828
Summary
Closes #209
Deployment Link
https://terra-graphs-deployed-pr-#.herokuapp.com/
Testing
Additional Details
Thank you for contributing to Terra.
@cerner/terra
@cerner/carbon