For documentation on code: JSDocs
| Constant | Value |
|---|---|
| BLUE | #176ba0 |
| GREEN | #076e00 |
| ORANGE | #b54900 |
| PINK | #ae0868 |
| PURPLE | #9c19a3 |
| YELLOW | #ffc20a |
| Constant | Value |
|---|---|
| LIGHT_BLUE | #008fe0 |
| LIGHT_GREEN | #4b9b1c |
| LIGHT_ORANGE | #e46511 |
| LIGHT_PINK | #e16092 |
| LIGHT_PURPLE | #bc70c7 |
| LIGHT_YELLOW | #ffda6c |
| Constant | Value |
|---|---|
| BLACK | #1c1f21 |
| GREY | #a7aaab |
| LAVENDER | #8374c2 |
| WHITE | #ffffff |
Note:
- In accordance with accessibility guidelines, Carbon colors must meet a contrast ratio of 3:1. Therefore,
COLORS.YELLOWandCOLORS.LIGHT_YELLOWwill eventually be removed from the color palette in a future major release. - If you are currently using
COLORS.YELLOWorCOLORS.LIGHT_YELLOW, please switch to a different color.
Used via Carbon.helpers.SHAPES.DARK
| Constant | Rendered as |
|---|---|
| CIRCLE | |
| CROSS | |
| DIAMOND | |
| RHOMBUS | |
| SQUARE | |
| TEAR_DROP | |
| TEAR_ALT | |
| TRIANGLE | |
| TRIANGLE_DOWN | |
| VERTICAL_BAR | |
| X |
Used via Carbon.helpers.SHAPES.LIGHT
| Constant | Rendered as |
|---|---|
| CIRCLE | |
| CROSS | |
| DIAMOND | |
| RHOMBUS | |
| SQUARE | |
| TEAR_DROP | |
| TEAR_ALT | |
| TRIANGLE | |
| TRIANGLE_DOWN | |
| VERTICAL_BAR | |
| X |
Carbon supports custom shapes as well! For more information on custom icon support, refer Carbon Shape
| Language |
|---|
| de_DE |
| en_AU |
| en_CA |
| en_GB |
| en_US |
| es_ES |
| fr_FR |
| ja_JP |
| pt_BR |
| nl_NL |
| sv_SE |
Consumers can provide a JSON for any locale, the format needs to be:
const locale_custom = {
decimal: ",",
thousands: ".",
grouping: [3],
currency: ["", " €"],
dateTime: "%A, der %e. %B %Y, %X",
date: "%d.%m.%Y",
time: "%H:%M:%S",
days: [
"Sonntag",
"Montag",
"Dienstag",
"Mittwoch",
"Donnerstag",
"Freitag",
"Samstag"
],
shortDays: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
months: [
"Januar",
"Februar",
"März",
"April",
"Mai",
"Juni",
"Juli",
"August",
"September",
"Oktober",
"November",
"Dezember"
],
shortMonths: [
"Jan",
"Feb",
"Mrz",
"Apr",
"Mai",
"Jun",
"Jul",
"Aug",
"Sep",
"Okt",
"Nov",
"Dez"
],
noData: "No Data"
};Resources on locale based tick formatting:
- No bind id is provided
- No axes information is provided [x, y]
- No lower and upper limits are provided for axes
- No Y axis label is provided
- No data is provided
- No data key is provided
- Data keys are not unique (If multiple data-sets are provided)
- No data values are not provided
- Data points are type
timeseriesbut the x-axis bounds aredefault - Data points are type
defaultbut the x-axis bounds aretimeseries - Data point values provided should be in UTC
- Data point values provided should be in RFC 3339 format
Legendonly loads if the data-set label is provided- This is part of a functionality, any
contentusing Graph API will have the ability to load data within graph and not show legend item
- This is part of a functionality, any
GraphandLegendcan be loaded in a separate containers whenbindToandbindLegendToelement id's are provided respectively
- If
y2axis is enabled, then the data-sets expect theyAxis: "y2"property
- The
onClickproperty needs to be a callback function - Callback function will be called on click of a data point, this function will determine the action performed
- If
localeis provided,ticks.formatis expected to be provided as well otherwise there is no effect on the graph itself.
valueswill not be subjected to any kind of pre-processing before generating the graph.valuesco-ordinates are expected to be linear/sorted.