Skip to content

Commit 70cf3b5

Browse files
committed
feat: add stacked bar column chart (react)
1 parent 721dc84 commit 70cf3b5

File tree

10 files changed

+841
-4
lines changed

10 files changed

+841
-4
lines changed

packages/ez-core/src/sample-data.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,21 @@ export const rawData: RawData = [
2222
{
2323
id: '1',
2424
label: 'Alpha',
25+
value0: 35,
2526
value: 50,
2627
amount: 10,
2728
},
2829
{
2930
id: '2',
3031
label: 'Beta',
32+
value0: 80,
3133
value: 100,
3234
amount: 20,
3335
},
3436
{
3537
id: '3',
3638
label: 'Gamma',
39+
value0: 60,
3740
value: 75,
3841
amount: 30,
3942
},

packages/ez-dev/jest/snapshots/components/Chart.spec.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ exports[`Chart should provide the chart data to the children components 1`] = `
4444
>
4545
<g transform="translate(20, 10)">
4646
<div>
47-
[{"id":"1","label":"Alpha","value":50,"amount":10},{"id":"2","label":"Beta","value":100,"amount":20},{"id":"3","label":"Gamma","value":75,"amount":30}]
47+
[{"id":"1","label":"Alpha","value0":35,"value":50,"amount":10},{"id":"2","label":"Beta","value0":80,"value":100,"amount":20},{"id":"3","label":"Gamma","value0":60,"value":75,"amount":30}]
4848
</div>
4949
</g>
5050
</svg>

packages/ez-dev/jest/snapshots/components/addons/Tooltip.spec.tsx.snap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ exports[`Tooltip renders the tooltip when a shape is hovered 1`] = `
1919
>
2020
</div>
2121
<div class="ez-tooltip-text">
22+
<div class="ez-tooltip-attribute value0">
23+
<div class="ez-tooltip-attribute--name">
24+
value0 :
25+
</div>
26+
<div class="ez-tooltip-attribute--value">
27+
35
28+
</div>
29+
</div>
2230
<div class="ez-tooltip-attribute value">
2331
<div class="ez-tooltip-attribute--name">
2432
value :

0 commit comments

Comments
 (0)