This repository has been archived by the owner on May 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
208 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
...docs/src/terra-dev-site/graph/CoreConfiguration.b/examples/RangeRoundingYAxisDisabled.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import React from 'react'; | ||
import Carbon from '@cerner/carbon-graphs'; | ||
|
||
// graph configuration object | ||
|
||
const graphConfig = { | ||
bindTo: '#range-rounding-disabled-example', | ||
axis: { | ||
x: { | ||
show: true, | ||
label: 'x-axis', | ||
lowerLimit: 100, | ||
upperLimit: 200, | ||
}, | ||
y: { | ||
show: true, | ||
label: 'y-axis', | ||
lowerLimit: -5, | ||
upperLimit: 20, | ||
rangeRounding: false, | ||
}, | ||
}, | ||
}; | ||
|
||
// graph dataset | ||
|
||
const dataset1 = { | ||
key: 'uid_1', | ||
label: { | ||
display: 'Data Label 1', | ||
}, | ||
color: Carbon.helpers.COLORS.BLACK, | ||
values: [ | ||
{ x: 87, y: -2 }, | ||
{ x: 95, y: 1 }, | ||
{ x: 103, y: -4 }, | ||
{ x: 109, y: -2 }, | ||
{ x: 128, y: 3 }, | ||
{ x: 145, y: 28 }, | ||
{ x: 151, y: 7 }, | ||
{ x: 164, y: 10 }, | ||
{ x: 177, y: 1 }, | ||
{ x: 192, y: 6 }, | ||
{ x: 203, y: -21 }, | ||
{ x: 209, y: -3 }, | ||
{ x: 246, y: 3 }, | ||
], | ||
}; | ||
|
||
// graph rendering | ||
|
||
const RangeRoundingDisabledExample = () => { | ||
React.useEffect(() => { | ||
const graph = Carbon.api.graph(graphConfig); | ||
graph.loadContent(Carbon.api.line(dataset1)); | ||
}, []); | ||
return <div id="range-rounding-disabled-example" />; | ||
}; | ||
|
||
export default RangeRoundingDisabledExample; |
59 changes: 59 additions & 0 deletions
59
...-docs/src/terra-dev-site/graph/CoreConfiguration.b/examples/RangeRoundingYAxisEnabled.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import React from 'react'; | ||
import Carbon from '@cerner/carbon-graphs'; | ||
|
||
// graph configuration object | ||
|
||
const graphConfig = { | ||
bindTo: '#range-rounding-enabled-example', | ||
axis: { | ||
x: { | ||
show: true, | ||
label: 'x-axis', | ||
lowerLimit: 100, | ||
upperLimit: 200, | ||
}, | ||
y: { | ||
show: true, | ||
label: 'y-axis', | ||
lowerLimit: -5, | ||
upperLimit: 20, | ||
}, | ||
}, | ||
}; | ||
|
||
// graph dataset | ||
|
||
const dataset1 = { | ||
key: 'uid_1', | ||
label: { | ||
display: 'Data Label 1', | ||
}, | ||
color: Carbon.helpers.COLORS.BLACK, | ||
values: [ | ||
{ x: 87, y: -2 }, | ||
{ x: 95, y: 1 }, | ||
{ x: 103, y: -4 }, | ||
{ x: 109, y: -2 }, | ||
{ x: 128, y: 3 }, | ||
{ x: 145, y: 28 }, | ||
{ x: 151, y: 7 }, | ||
{ x: 164, y: 10 }, | ||
{ x: 177, y: 1 }, | ||
{ x: 192, y: 6 }, | ||
{ x: 203, y: -21 }, | ||
{ x: 209, y: -3 }, | ||
{ x: 246, y: 3 }, | ||
], | ||
}; | ||
|
||
// graph rendering | ||
|
||
const RangeRoundingEnabledExample = () => { | ||
React.useEffect(() => { | ||
const graph = Carbon.api.graph(graphConfig); | ||
graph.loadContent(Carbon.api.line(dataset1)); | ||
}, []); | ||
return <div id="range-rounding-enabled-example" />; | ||
}; | ||
|
||
export default RangeRoundingEnabledExample; |
60 changes: 60 additions & 0 deletions
60
...s/terra-graphs-docs/src/terra-dev-site/graph/CoreConfiguration.b/examples/YAxisHidden.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import React from 'react'; | ||
import Carbon from '@cerner/carbon-graphs'; | ||
|
||
// graph configuration object | ||
|
||
const graphConfig = { | ||
bindTo: '#y-axis-hidden-example', | ||
axis: { | ||
x: { | ||
show: true, | ||
label: 'x-axis', | ||
lowerLimit: 100, | ||
upperLimit: 200, | ||
allowCalibration: true, | ||
}, | ||
y: { | ||
show: true, | ||
label: 'y-axis', | ||
lowerLimit: -5, | ||
upperLimit: 20, | ||
}, | ||
}, | ||
}; | ||
|
||
// graph dataset | ||
|
||
const dataset1 = { | ||
key: 'uid_1', | ||
label: { | ||
display: 'Data Label 1', | ||
}, | ||
color: Carbon.helpers.COLORS.BLACK, | ||
values: [ | ||
{ x: 87, y: -2 }, | ||
{ x: 95, y: 1 }, | ||
{ x: 103, y: -4 }, | ||
{ x: 109, y: -2 }, | ||
{ x: 128, y: 3 }, | ||
{ x: 145, y: 28 }, | ||
{ x: 151, y: 7 }, | ||
{ x: 164, y: 10 }, | ||
{ x: 177, y: 1 }, | ||
{ x: 192, y: 6 }, | ||
{ x: 203, y: -21 }, | ||
{ x: 209, y: -3 }, | ||
{ x: 246, y: 3 }, | ||
], | ||
}; | ||
|
||
// graph rendering | ||
|
||
const YAxisHiddenExample = () => { | ||
React.useEffect(() => { | ||
const graph = Carbon.api.graph(graphConfig); | ||
graph.loadContent(Carbon.api.line(dataset1)); | ||
}, []); | ||
return <div id="y-axis-hidden-example" />; | ||
}; | ||
|
||
export default YAxisHiddenExample; |