-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): first attempt at combo-chart
- Loading branch information
Showing
11 changed files
with
354 additions
and
47 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import { colors } from "./colors"; | ||
|
||
export const comboData = { | ||
labels: ["Qty", "More", "Sold", "Restocking", "Misc"], | ||
datasets: [ | ||
{ | ||
label: "Dataset 1", | ||
backgroundColors: [colors[0]], | ||
data: [ | ||
65000, | ||
-29123, | ||
-35213, | ||
51213, | ||
16932 | ||
], | ||
chartType: "BarChart" | ||
}, | ||
{ | ||
label: "Dataset 2", | ||
backgroundColors: [colors[2]], | ||
data: [ | ||
-12312, | ||
23232, | ||
34232, | ||
-12312, | ||
-34234 | ||
], | ||
chartType: "BarChart" | ||
}, | ||
{ | ||
label: "Dataset 3", | ||
backgroundColors: [colors[3]], | ||
data: [ | ||
-32423, | ||
21313, | ||
64353, | ||
24134, | ||
32423 | ||
], | ||
chartType: "BarChart" | ||
}, | ||
{ | ||
label: "Dataset 4", | ||
backgroundColors: [colors[1]], | ||
data: [ | ||
32432, | ||
11312, | ||
3234, | ||
43534, | ||
34234 | ||
], | ||
chartType: "LineChart" | ||
} | ||
] | ||
}; | ||
|
||
export const comboOptions = { | ||
scales: { | ||
x: { | ||
title: "2018 Annual Sales Figures", | ||
}, | ||
y: { | ||
formatter: axisValue => `${axisValue / 1000}k`, | ||
yMaxAdjuster: yMaxValue => yMaxValue * 1.1, | ||
}, | ||
y2: { | ||
ticks: { | ||
max: 70, | ||
min: -60 | ||
} | ||
} | ||
}, | ||
legendClickable: true, | ||
containerResizable: true | ||
}; |
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
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
Oops, something went wrong.