Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
438 commits
Select commit Hold shift + click to select a range
860ed12
docs(charts): remake the area chart stories
JRamonAlves Jun 3, 2025
8861f70
docs(charts): create the docs for the area charts making
JRamonAlves Jun 3, 2025
0802182
fix(charts): separate area and line stories, and fix hook from area c…
JRamonAlves Jun 3, 2025
c1659b1
feat(chart): adds green color
leofarias-cpu Jun 9, 2025
7f70690
feat(chart): area chart and stacked variant implemented
leofarias-cpu Jun 9, 2025
ea4cc71
fix: removed zoom from area chart by default
leofarias-cpu Jun 9, 2025
730d4ee
fix: compositor typing and chart title typing
leofarias-cpu Jun 9, 2025
2cf8a79
docs: removed area example
leofarias-cpu Jun 9, 2025
c4d24d5
fix(charts): make stories using the args and not using render
JRamonAlves Jun 10, 2025
c8835a2
fix(charts): fix zoom bar in line chart
JRamonAlves Jun 10, 2025
3967709
style(chart): added names to area storybook
leofarias-cpu Jun 10, 2025
a380de5
style(chart): added names to area storybook
leofarias-cpu Jun 10, 2025
44e71e2
fix(charts): make zoom bar default
JRamonAlves Jun 10, 2025
3ae45fa
fix(charts): fix bar gap hook stories
JRamonAlves Jun 10, 2025
1534b6a
style(chart): renamed some bar storybooks
leofarias-cpu Jun 11, 2025
7928d1b
style(chart): renamed default area variant to overlapping
leofarias-cpu Jun 11, 2025
34503a6
fix(chart): removed zoom from default in area chart
leofarias-cpu Jun 12, 2025
794f7bf
docs(chart): added temporary chart examples
leofarias-cpu Jun 12, 2025
d26993a
Merge branch 'vtex:main' into main
leofarias-cpu Jun 12, 2025
0d618ce
Merge branch 'feature/charts-package' of https://github.com/leofarias…
leofarias-cpu Jun 12, 2025
4fce027
docs(charts): restructured data visualization~
leofarias-cpu Jun 12, 2025
a71cc20
docs(charts): restructured data visualization
leofarias-cpu Jun 13, 2025
76cc04b
docs(chart): renames bar page
leofarias-cpu Jun 13, 2025
dd355a8
refactor(charts): creates a way to force the chart reloading, making …
JRamonAlves Jun 10, 2025
3655dd8
refactor(charts): remake of tooltip for the area charts based on desi…
JRamonAlves Jun 13, 2025
c795c79
refactor(charts): rename for reverse in the tooltip options
JRamonAlves Jun 13, 2025
bdaa2c8
docs(chart): fixes some examples
leofarias-cpu Jun 13, 2025
f9c4081
feat(chart): start of legend reimplementation
leofarias-cpu Jun 17, 2025
0e903e7
feat(chart): area chart colors updated and checkboxLegend fully funct…
leofarias-cpu Jun 18, 2025
7b20069
fix(charts): redo the check box legend behavior to make it work with …
JRamonAlves Jun 19, 2025
d296094
fix(chart): checkbox legend correctly works for every chart again
leofarias-cpu Jun 25, 2025
7b198d3
feat(chart): creates function to activate or not zoom function
JRamonAlves Jun 26, 2025
cf2980c
fix(chart): makes trigger on axis the default
JRamonAlves Jun 26, 2025
ca927e9
fix(chart): no longer flickers and re renders on window size change
leofarias-cpu Jun 26, 2025
ea58035
refactor(chart): added braces to conditionals
leofarias-cpu Jun 26, 2025
561c7e9
refactor(charts): creates a way to force the chart reloading, making …
JRamonAlves Jun 10, 2025
81b67d9
refactor(charts): remake of tooltip for the area charts based on desi…
JRamonAlves Jun 13, 2025
95f4092
refactor(charts): rename for reverse in the tooltip options
JRamonAlves Jun 13, 2025
53336e1
docs(chart): fixes some examples
leofarias-cpu Jun 13, 2025
3201588
fix(charts): redo the check box legend behavior to make it work with …
JRamonAlves Jun 19, 2025
367070c
feat(chart): creates function to activate or not zoom function
JRamonAlves Jun 26, 2025
1ccc761
fix(chart): makes trigger on axis the default
JRamonAlves Jun 26, 2025
bca7083
refactor(chart): added braces to conditionals
leofarias-cpu Jun 26, 2025
1ebd5a9
feat(chart): added optional checkbox visual
leofarias-cpu Jun 30, 2025
9526d9b
feat(chart): added optional checkbox visual
leofarias-cpu Jun 30, 2025
dee60a9
fix(chart): only line chart has zoom by default
leofarias-cpu Jun 30, 2025
2568466
refactor(chart): setAreaColors is now cleaner and the gradient is ide…
leofarias-cpu Jun 30, 2025
2f016e3
fix(chart): changed area chart area color back
leofarias-cpu Jul 1, 2025
9d75fe4
fix(charts): fix the sync legend problem with the same name
JRamonAlves Jul 3, 2025
5baf678
docs(chart): fix typo
leofarias-cpu Jun 13, 2025
011da2c
fix(chart): charts are synced when rendered, not later
leofarias-cpu Jul 7, 2025
c9f74b0
style(chart): rename onFinished to onRendered
leofarias-cpu Jul 7, 2025
23bd595
style(area-chart): rewrote xaxis in english
leofarias-cpu Jul 7, 2025
14f818b
fix(chart-line): remove zoom from being enabled by defautl
leofarias-cpu Jul 7, 2025
8be3119
test(chart-area): swap area story for the equivalent area example tha…
leofarias-cpu Jul 7, 2025
e84152e
fix(chart-area): correct colors and opacity of area
leofarias-cpu Jul 7, 2025
b34ba27
fix(chart): remove padding
leofarias-cpu Jul 7, 2025
ee1dc8e
fix(chart-area): remove gap between yaxis and areas
leofarias-cpu Jul 7, 2025
139ae17
docs(chart-line): fix name to trend line chart
JRamonAlves Jul 8, 2025
536d7d8
docs(chart-line): make the chart has one more line in gray-6
JRamonAlves Jul 8, 2025
6575c15
refactor(chart-compositor): make chart compositor takes more function…
JRamonAlves Jul 8, 2025
7b240bf
feat(chart-line): speed up animation
leofarias-cpu Jul 8, 2025
5c4d6f8
fix(chart): add 8 right padding to prevent cutoff of chart elements
leofarias-cpu Jul 8, 2025
f2167c6
docs(chart): reorganize chart and remove non design best pratices
leofarias-cpu Jul 8, 2025
534e18f
docs(chart): adds loading state examples for charts
JRamonAlves Jul 8, 2025
249a9c9
Merge branch 'feature/charts-package' of https://github.com/theo-rodr…
JRamonAlves Jul 8, 2025
f96b1dc
fix(chart-line): typo mistakes and makes the trend line gray
JRamonAlves Jul 8, 2025
c8a9de6
fix(chart): turning off checkboxlegend behaviour works again
leofarias-cpu Jul 8, 2025
d582176
docs(chart): reorganize chart and remove non design best pratices
leofarias-cpu Jul 8, 2025
7aa3a1c
feat(chart): make titles centered
leofarias-cpu Jul 8, 2025
abe62ad
test(chart): add animation storybook
leofarias-cpu Jul 8, 2025
f8b90a3
docs(chart): update changing styling and add a warning about not chan…
leofarias-cpu Jul 8, 2025
7c18c31
fix(chart): fix names and storybooks names
JRamonAlves Jul 8, 2025
7cf11e3
Merge branch 'feature/charts-package' of https://github.com/theo-rodr…
JRamonAlves Jul 8, 2025
183dc05
chore(package.json): move echarts from a devDepencie to a regular one
leofarias-cpu Jul 9, 2025
e5acd8a
test(chart): add story to test animations
JRamonAlves Jul 9, 2025
cdee02c
fix(chart): remove test from the story
JRamonAlves Jul 10, 2025
cb641e6
fix(charts): fix names and where should be the story of animation test
JRamonAlves Jul 10, 2025
e1eed11
test(chart): refactor and rename animation easing functions example
leofarias-cpu Jul 10, 2025
ea28435
test(chart): tooltip story now renders legend again
leofarias-cpu Jul 10, 2025
0720422
feat(chart): add new tooltip and change tooltip story to match new fi…
leofarias-cpu Jul 11, 2025
94b78a0
docs(chart): move loading state examples further down
leofarias-cpu Jul 11, 2025
f814186
docs(chart): re-added design bar chart docs and fixed an example
leofarias-cpu Jun 13, 2025
d85f355
fix(chart): changed area chart area color back
leofarias-cpu Jul 1, 2025
2486277
docs(chart): rename bar best practices
leofarias-cpu Jul 11, 2025
52d0e20
docs(chart): fix duplicate compositor page and remove optional props …
leofarias-cpu Jul 14, 2025
3a8430a
fix(chart): change to use shoreline color when possible
leofarias-cpu Jul 14, 2025
ec922a8
feat(chart): checkbox legend visuals uses series colors directly
leofarias-cpu Jul 14, 2025
6d7666b
fix(chart-area): fix area colors
leofarias-cpu Jul 14, 2025
dc489e7
fix(chart-area): fix area line colors
leofarias-cpu Jul 14, 2025
3e6481c
fix(chart-compositor): fix checkbox legend colors
leofarias-cpu Jul 15, 2025
22522dc
refactor(chart): move legend color attribute get closer to where its …
leofarias-cpu Jul 15, 2025
d1fcc3f
test(chart): remove debug square
leofarias-cpu Jul 15, 2025
456abf3
fix(chart): add tooltip min and max height, use tokens for spacing
leofarias-cpu Jul 16, 2025
4cbf6c0
fix(chart): fix spacing between tooltip colored line and text
leofarias-cpu Jul 16, 2025
90a2f8b
fix(chart): confine tooltip to chart boundaries
leofarias-cpu Jul 16, 2025
e6b2be4
refactor(chart): simplify conditionals in checkbox legend
leofarias-cpu Jul 16, 2025
c370ffd
feat(charts): calls the onEvents functions in addition to the intern …
JRamonAlves Jul 17, 2025
9ddc002
style(chart): clarifiy conditional around legendvisuals
leofarias-cpu Jul 21, 2025
af48b9e
test(chart-line): remove unecessary type setting for series
leofarias-cpu Jul 21, 2025
dda71e3
style(chart): rename eventsAdaption to eventsAdapter
leofarias-cpu Jul 21, 2025
35b9d3c
feat(chart-bar): add early implementation of stacked bar chart
leofarias-cpu Jul 21, 2025
ccd2ed1
fix(chart): removed uncessary cloning in chart hooks
leofarias-cpu Jul 23, 2025
037768e
fix(chart): fix optionHooks jsdocs
leofarias-cpu Jul 23, 2025
58fb93c
docs(chart): re-added design bar chart docs and fixed an example
leofarias-cpu Jun 13, 2025
9f37ff7
fix(chart): fix imports in chart component
leofarias-cpu Jul 11, 2025
578d0b9
docs(charts): restyled some examples for more consistency
leofarias-cpu Jul 23, 2025
2f497d3
docs(chart): fix best practices title and rename bar variant from def…
leofarias-cpu Jul 23, 2025
b58c5c0
feat(chart-legend): creates the first version of the legend of the chart
JRamonAlves Jul 23, 2025
4f96094
fix(chart-zoom): makes compositor use correct zoom functions and turn…
JRamonAlves Jul 23, 2025
b86bf7a
feat(funnel-chart): add funnel chart prototype
leofarias-cpu Jul 25, 2025
b9eb2a8
feat(chart-legend): add states to the legend and their treatment
JRamonAlves Jul 26, 2025
2553826
fix(chart-area): now allows changing colors
leofarias-cpu Jul 28, 2025
a6bf3d5
fix(chart-area): remove console log
leofarias-cpu Jul 28, 2025
c122d51
feat(chart-legend): makes legend behaviour and states
JRamonAlves Jul 29, 2025
ef2d10f
refactor(chart-legend): refactor code for more clean usage and logics…
JRamonAlves Jul 30, 2025
bed8689
refactor(chart-legend): fix sync test and delete not used functions
JRamonAlves Jul 30, 2025
d72cd1e
fix(chart-legend): fix the size of the legend due to designer reviews
JRamonAlves Jul 31, 2025
8dabd8a
feat(chart-area): change area color to match line color
leofarias-cpu Jul 31, 2025
96215b9
fix(chart-legend): fix the legend font and check icon size
JRamonAlves Jul 31, 2025
0375ee0
fix(chart-legend): makes the legend button not focus during the mouse…
JRamonAlves Jul 31, 2025
03432c1
fix(chart-legend): fix according to the Pull Request Review
JRamonAlves Jul 31, 2025
0e9a337
feat(chart-bar-stacked): refine implementation
leofarias-cpu Aug 1, 2025
e2b6929
fix(chart-bar-stacked): correct gap size
leofarias-cpu Aug 1, 2025
5679e24
fix(chart): using shoreline color tokens no longer flickers
leofarias-cpu Aug 1, 2025
1d656f7
feat(chart): add stacked percentage bar
leofarias-cpu Aug 1, 2025
877f9b9
fix(chart-legend): fix the legend resize in small displays
JRamonAlves Aug 7, 2025
466f00c
fix: fixed depencies in chart useMemos and useCallback, added warn to…
leofarias-cpu Aug 7, 2025
b367d29
fix(chart): add css to change cursor on chart series and set stack ba…
leofarias-cpu Aug 8, 2025
cff1f1a
fix(chart): css atribute now checks for default variant by type
leofarias-cpu Aug 8, 2025
48e72f5
feat(chart-bar-stacked percentage): y axis label now in percentage % …
leofarias-cpu Aug 8, 2025
9141293
test(chart): make a loading example for the charts
JRamonAlves Aug 11, 2025
e34d33d
feat(chart): user hooks now execute after default ones
leofarias-cpu Aug 12, 2025
5ab525b
fix(chart-legend): add prop to whether use the checkbox legend
JRamonAlves Aug 13, 2025
34a1b7b
fix(chart-legend): add hover for turned off serie
JRamonAlves Aug 13, 2025
ae0d33d
Merge branch 'feature/charts-package' of https://github.com/theo-rodr…
JRamonAlves Aug 14, 2025
0ba56c0
fix(chart-legend): fix merge problems
JRamonAlves Aug 14, 2025
d3fc5c0
style: checkboxLegends made singular
leofarias-cpu Aug 15, 2025
910e759
Merge pull request #2 from theo-rodrigues/feature/charts-package-legend
leofarias-cpu Aug 15, 2025
14521c8
feat(chart): initial time axis implementation
leofarias-cpu Aug 15, 2025
5d2bc8d
fix(chart): add locale to hooks dependencies
leofarias-cpu Aug 15, 2025
2103af9
feat(chart): time axis format now receives format options
leofarias-cpu Aug 15, 2025
c2c62fd
style(chart-legend): fix border-radius
JRamonAlves Aug 15, 2025
9b38684
docs(chart-hooks): creates the first version of the hook page
JRamonAlves Aug 20, 2025
9059acf
feat(chart-bar-stacked): always rounds the top bar, using the legend …
JRamonAlves Aug 26, 2025
89e4611
fix(legend): adjust hover and overlap color for area chart
theo-rodrigues Aug 26, 2025
dc23cb4
chore: remove unused variables
theo-rodrigues Aug 26, 2025
b55e090
fix(chart-compositor): legend now works again
leofarias-cpu Aug 27, 2025
2afb231
style: change funnel story series name
leofarias-cpu Aug 27, 2025
de470a1
fix(chart): uncomment resizing code
JRamonAlves Aug 28, 2025
19ee878
fix(chart-legend): fix legend state conversion
JRamonAlves Aug 28, 2025
86988de
refactor(chart-legend): refactor legend states to use strings in orde…
JRamonAlves Aug 28, 2025
f512d7e
fix(benchmark): fix components used in tests
theo-rodrigues Sep 1, 2025
1ea5a35
refactor(legend): make legend handle diferent changes
theo-rodrigues Sep 3, 2025
fbb7cfe
feat: init localization
leofarias-cpu Aug 19, 2025
10e76fc
feat: add localization for a lot of languages, including portuguese
leofarias-cpu Aug 19, 2025
fc08e2c
docs: add page about charts synchronization
leofarias-cpu Sep 3, 2025
dafd903
feat(chart-colors): allow to the user pass a link to a color shade us…
JRamonAlves Sep 3, 2025
257cc00
fix: typo in addHoverToColors
leofarias-cpu Sep 3, 2025
5a410ac
fix(chart-colors): fix function docs and name
JRamonAlves Sep 3, 2025
0de3d4e
docs(chart): update changing styling to feature changing legend hover…
leofarias-cpu Sep 3, 2025
88bcc82
feat(chart-scatter): creates a prototype of scatter chart without des…
JRamonAlves Sep 11, 2025
d8328f3
fix(chart-scatter): fix to make chart stories not random
JRamonAlves Sep 11, 2025
1d9704b
feat: add sunburst chart and make emphasis easier to use by the user
leofarias-cpu Sep 15, 2025
68dba39
feat(chart-sunburst): add hook to color root node
leofarias-cpu Sep 17, 2025
6c85f46
fix(chart-compositor): pass option correctly to chart
leofarias-cpu Sep 17, 2025
18d7281
fix(chart-compositor): grid can now be modified
leofarias-cpu Sep 17, 2025
b26d135
feat(chart-compositor): add story with sunburst
leofarias-cpu Sep 17, 2025
2254025
feat(chart): add example for donut chart
theo-rodrigues Sep 23, 2025
aec0037
feat(chart-scatter): creates a prototype of scatter chart without des…
JRamonAlves Sep 11, 2025
4f227dc
fix(chart-scatter): fix to make chart stories not random
JRamonAlves Sep 11, 2025
eb25ead
Merge branch 'feature/chart-scatter-prototype' of https://github.com/…
JRamonAlves Sep 24, 2025
fa7dacb
fix(chart-types): fix merge problems
JRamonAlves Sep 24, 2025
0db71d8
fix(chart-compositor): fix build problems with compositor
JRamonAlves Sep 24, 2025
7b8ec72
Merge pull request #4 from theo-rodrigues/feature/chart-scatter-proto…
JRamonAlves Sep 24, 2025
23b052c
test(chart-scatter): creates benchmark for scatter chart
JRamonAlves Oct 1, 2025
f95c351
docs(chart-area): add description for chart area
leofarias-cpu Oct 2, 2025
245d484
fix(chart): change optionHooks docs 'before default styling -> after …
leofarias-cpu Oct 6, 2025
bbd9baa
docs: removed changing styling page and changed hooks example to be c…
leofarias-cpu Oct 6, 2025
b3ef35d
feat(chart): loading state nowshows axis lines and no longer breaks t…
leofarias-cpu Oct 7, 2025
ea08de1
feat(chart): turns off auto merge, making the chart less statefull
leofarias-cpu Oct 7, 2025
7d653c4
feat(chart): loading examples improved to allow manual toggling of lo…
leofarias-cpu Oct 7, 2025
10d0bc7
feat(chart-tooltip): change the way tooltip is created
JRamonAlves Oct 8, 2025
81ba03e
fix(chart-tooltip): fix type errors
JRamonAlves Oct 8, 2025
340a011
fix(chart): fix chart API error
JRamonAlves Oct 8, 2025
be90242
feat(chart): add chart skeletons
leofarias-cpu Oct 10, 2025
2eb229d
feat(chart-skeleton): added configuration for number of lines and col…
leofarias-cpu Oct 13, 2025
752bae3
feat(chart-skeleton): added space for where the legend would be
leofarias-cpu Oct 13, 2025
522341a
docs(chart): changed loading examples to use new loadingOptions
leofarias-cpu Oct 13, 2025
16ad678
fix(chart-tooltip): remove all the lastests tooltips changes
JRamonAlves Oct 13, 2025
b40db13
fix(chart-tooltip): remove unsed props
JRamonAlves Oct 13, 2025
5276e1f
docs(chart-area): fixed loading state example to actually be an area …
leofarias-cpu Oct 13, 2025
b379a44
feat(chart-scatter): make new variant for sactter. New variant shows …
JRamonAlves Oct 13, 2025
dff8a69
Merge branch 'feature/charts-package' of https://github.com/theo-rodr…
JRamonAlves Oct 13, 2025
9a0a3de
test(chart-scatter): test in storybook for the new variant
JRamonAlves Oct 14, 2025
819818a
fix(chart): remove commented out code
leofarias-cpu Oct 20, 2025
f48f0cb
fix(chart-legend): fix implementation not using the types and changes…
JRamonAlves Oct 20, 2025
b7a7323
fix(chart-hooks): put charts default hooks into an different archive
JRamonAlves Oct 20, 2025
0214989
fix(chart-tooltip): remove unecessary important, and add white-space:…
leofarias-cpu Oct 20, 2025
e4b101e
fix(chart-skeleton): remove unecessary default height and width param…
leofarias-cpu Oct 20, 2025
7a0bc66
style(chart): improve readability with whitespace
theo-rodrigues Oct 20, 2025
3e0e846
Merge branch 'feature/charts-package' of https://github.com/theo-rodr…
theo-rodrigues Oct 20, 2025
4840444
Merge branch 'feature/charts-package' of https://github.com/theo-rodr…
JRamonAlves Oct 22, 2025
0ed319a
fix(chart-scatter): change the name of the variant to third-dimension
JRamonAlves Oct 22, 2025
6beb347
refactor(chart-scatter): changes the name of the variant to third-dim…
JRamonAlves Oct 22, 2025
8878589
refactor(chart-legend): change to the shoreline button instead of nor…
JRamonAlves Oct 22, 2025
549ab0c
fix(chart): fix Flex box to 0 gap
JRamonAlves Oct 22, 2025
5574879
docs: update readme
leofarias-cpu Oct 22, 2025
f0516de
style(legend): change the fontsize unit from px to rem
theo-rodrigues Oct 24, 2025
80dc46f
style(chart): legend colors selection clarified
leofarias-cpu Oct 22, 2025
2cab8f4
style(chart): setBarGap refactored to be clearer
leofarias-cpu Oct 22, 2025
2779360
fix(chart-compositor): bar gap now properly applied
leofarias-cpu Oct 24, 2025
3ee2fe5
fix(chart-compositor): bar gap added to compositor story
leofarias-cpu Oct 24, 2025
3499d4f
docs(chart): adds docs for all hooks missing them
leofarias-cpu Oct 24, 2025
05cc047
docs(chart): adds docs for chart skeleton
leofarias-cpu Oct 24, 2025
f3162df
docs(chart): adds docs for chart utils
leofarias-cpu Oct 24, 2025
8a65bf6
feat(chart): removed buildDefaultSerie to avoid unecessary cloning
leofarias-cpu Oct 24, 2025
8d5f849
docs(chart): more docs for chart utils
leofarias-cpu Oct 24, 2025
aacb9f6
docs(chart): changed name and added docs for apply series hooks
leofarias-cpu Oct 24, 2025
015475f
fix(chart-zoom): remove zoom features from the charts
JRamonAlves Oct 24, 2025
a76e0b3
fix(chart-skeleton): pass css props to css proper classes
JRamonAlves Oct 24, 2025
233eebb
Merge branch 'feature/charts-package' of https://github.com/theo-rodr…
JRamonAlves Oct 24, 2025
f4f973e
fix(chart-compositor): change name of function according to preview c…
JRamonAlves Oct 24, 2025
5312ec3
fix(chart): properly merges series with defaultStyle.series
leofarias-cpu Oct 27, 2025
d332178
feat(chart): locale prop now has loose autocomplete of valid lcoales
leofarias-cpu Oct 27, 2025
eadd143
refactor(chart-zoom): remove the data zoom options and remove example…
JRamonAlves Oct 27, 2025
d499e44
fix(chart): removed zoom story
leofarias-cpu Oct 28, 2025
816435a
docs(chart-skeleton): added justification for the very exact 40px pad…
leofarias-cpu Oct 28, 2025
a777bc9
style(chart): changed componenent declarations to use arrow function …
leofarias-cpu Oct 28, 2025
e083235
docs(chart-tooltip): added docs and removed some duplicate code
leofarias-cpu Oct 28, 2025
032e815
docs: add docs for compactNumber
leofarias-cpu Oct 28, 2025
99e19b7
docs: clarified compactNumber use
leofarias-cpu Oct 28, 2025
8ffe811
style(chart): changed checkbox legend to an exhaustive switch on the …
leofarias-cpu Oct 28, 2025
72824bf
refactor(chart-legend): change 'ifs' and 'elses' to a switch statemen…
JRamonAlves Oct 28, 2025
b946092
docs(chart-legend): added docs for legendItem
leofarias-cpu Oct 29, 2025
25f60dc
docs(chart-tooltip): added docs for tooltipBase
leofarias-cpu Oct 29, 2025
4e73efe
style(chart-tooltip): chartToolTipBase -> chartTooltipLine
leofarias-cpu Oct 29, 2025
89cace1
style(chart-legend): renamed legend action to be simpler and added do…
leofarias-cpu Oct 29, 2025
b8fa9d6
refactor(legend): refactor the legend changes handler
theo-rodrigues Oct 29, 2025
528534e
fix(chart): remove getchanges and add the proper way to handle the le…
theo-rodrigues Oct 29, 2025
63685eb
refactor(legend): improve legend hooks design
theo-rodrigues Oct 30, 2025
1cd3c43
fix(chart): change handlechange to handleHooks
theo-rodrigues Oct 30, 2025
187a599
fix(chart-legend): barRoundingToggle now handles cases with 0 visible…
leofarias-cpu Oct 30, 2025
2dde456
style(chart-legend): removed 1 level of identation and added some com…
leofarias-cpu Oct 31, 2025
14ece17
docs(legend): add legend remaining docs
theo-rodrigues Nov 3, 2025
54940fc
docs(chart-legend): add doc for toggleSerie
leofarias-cpu Nov 3, 2025
3e88c4e
fix(chart-legend): legend button checkbox now properly centered in th…
leofarias-cpu Nov 3, 2025
d9bd815
refactor(chart): replaces lodash dependency with lodas.clonedeep, the…
leofarias-cpu Dec 3, 2025
d6e894a
docs(chart): add default to locale prop
leofarias-cpu Dec 4, 2025
3bfc894
Merge branch 'main' of https://github.com/theo-rodrigues/shoreline-ch…
leofarias-cpu Dec 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Chromatic"

on: push

jobs:
chromatic:
name: Run Chromatic
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 22.14.0
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Run Chromatic
uses: chromaui/action@latest
2 changes: 1 addition & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { dirname, join } from 'node:path'
const { dirname, join } = require('node:path')

module.exports = {
stories: ['../packages/**/*.stories.@(js|jsx|ts|tsx)'],
Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"noRedeclare": "off"
},
"correctness": {
"useExhaustiveDependencies": "off",
"useExhaustiveDependencies": "warn",
"noUnusedImports": "error"
}
}
Expand Down
7 changes: 7 additions & 0 deletions chromatic.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"onlyChanged": true,
"projectId": "Project:67dafea9025400b3251fa8ef",
"projectToken": "chpt_242dc59fcdeb02b",
"zip": true,
"buildScriptName": "build:storybook"
}
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,29 +40,29 @@
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@chromatic-com/storybook": "^1",
"@chromatic-com/storybook": "^3.2.6",
"@commitlint/cli": "^9.1.2",
"@commitlint/config-conventional": "^9.1.2",
"@commitlint/prompt": "^9.1.2",
"@playwright/test": "^1.43.0",
"@storybook/addon-a11y": "^8.3.6",
"@storybook/addon-actions": "^8.3.6",
"@storybook/addon-essentials": "^8.3.6",
"@storybook/addon-interactions": "^8.3.6",
"@storybook/addon-links": "^8.3.6",
"@storybook/addon-storysource": "^8.3.6",
"@storybook/react": "^8.3.6",
"@storybook/react-vite": "^8.3.6",
"@storybook/react-webpack5": "^8.3.6",
"@playwright/test": "^1.51.1",
"@storybook/addon-a11y": "^8.6.7",
"@storybook/addon-actions": "^8.6.7",
"@storybook/addon-essentials": "^8.6.7",
"@storybook/addon-interactions": "^8.6.7",
"@storybook/addon-links": "^8.6.7",
"@storybook/addon-storysource": "^8.6.7",
"@storybook/react": "^8.6.7",
"@storybook/react-vite": "^8.6.7",
"@storybook/react-webpack5": "^8.6.7",
"@storybook/test-runner": "^0.17.0",
"@storybook/theming": "^8.3.6",
"@storybook/theming": "^8.6.7",
"@types/node": "20.14.9",
"@types/react": "18.3.11",
"@types/react-dom": "18.3.1",
"@vitejs/plugin-react": "4.1.0",
"@vtex/shoreline-test-utils": "workspace:*",
"chromatic": "^9.1.0",
"commitizen": "^4.2.0",
"chromatic": "^11.27.0",
"commitizen": "^4.3.1",
"concurrently": "^8.2.2",
"http-server": "^14.1.1",
"husky": "^8.0.3",
Expand All @@ -75,7 +75,7 @@
"react": "18.3.1",
"react-dom": "18.3.1",
"react-test-renderer": "18.3.1",
"storybook": "^8.3.6",
"storybook": "^8.6.7",
"tslib": "2.6.3",
"tsup": "8.1.0",
"turbo": "2.2.3",
Expand All @@ -93,7 +93,7 @@
}
},
"dependencies": {
"@storybook/test": "^8.3.6",
"dotenv": "^16.4.5"
"@storybook/test": "^8.6.7",
"dotenv": "^16.4.7"
}
}
25 changes: 25 additions & 0 deletions packages/charts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 🌊📊 Shoreline Charts

[Shoreline](https://github.com/vtex/shoreline/tree/main)'s data visualization library, featuring a standard set of charts and their variants, built with Apache Echarts.

<img width="849" height="342" alt="Screenshot_21-Aug_18-02-39_google-chrome" src="https://github.com/user-attachments/assets/aa2a4d5a-200f-4481-aa60-192d30e79a32" />



## Install and build
`shoreline-components` and `echarts` are peer dependencies of `shoreline-charts`
```sh
pnpm add @vtex/shoreline echarts @vtex/shoreline-charts
```
## Run
``` sh
pnpm test # [*] runs all tests from all components at once
pnpm clean # [*] useful if you want to clean all packages at once - since they are linked, sometimes a rebase not followed by a fresh reinstall can cause some issues
pnpm dev:storybook # [components package] runs its storybook alongside the styles package
pnpm dev:docs # [docs package] runs the docs website
```

## Contribute to this repo

Pull requests are welcome, please check our
[development guideline](https://shoreline.vtex.com/guides/code/development-guideline)!
56 changes: 56 additions & 0 deletions packages/charts/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"name": "@vtex/shoreline-charts",
"description": "Shoreline datavis library",
"version": "0.0.0",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org"
},
"files": [
"dist"
],
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
},
"./css": "./dist/index.css"
},
"engines": {
"node": ">=16"
},
"scripts": {
"prebuild": "rm -rf dist",
"dev": "tsup --watch",
"build": "tsup"
},
"repository": {
"directory": "packages/charts",
"type": "git",
"url": "git+https://github.com/vtex/shoreline.git"
},
"bugs": {
"url": "https://github.com/vtex/shoreline/issues"
},
"peerDependencies": {
"@vtex/shoreline": "1.x",
"echarts": "6.x",
"react": "18.x",
"react-dom": "18.x"
},
"devDependencies": {
"@types/lodash.clonedeep": "^4.5.9",
"@vtex/shoreline": "workspace:*"
},
"dependencies": {
"@vtex/shoreline-utils": "workspace:*",
"echarts": "^6.0.0",
"echarts-for-react": "^3.0.4",
"lodash.clonedeep": "^4.5.0",
"vitest-canvas-mock": "^0.3.3"
}
}
52 changes: 52 additions & 0 deletions packages/charts/src/benchmarks/__fixtures__/chartData.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
export const BAR_CHART_DATA = {
xAxis: {
weekdays: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
},
series: {
dayNumbers: [1, 2, 3, 4, 5, 6, 7],
},
}

const dayNumbers_100thousand = []
const numbers_50thousand = []
const dayNumbers_30thousand = []
const dayNumbers_20thousand = []
const dayNumbers_10thousand = []
const numbers_5thousand = []
const numbers_4thousand = []
const numbers_1thousand = []

for (let i = 0; i < 100_000; i++) {
dayNumbers_100thousand.push(i)
if (i <= 1000) numbers_1thousand.push(i)
if (i <= 4_000) numbers_4thousand.push(i)
if (i <= 5_000) numbers_5thousand.push(i)
if (i <= 10_000) dayNumbers_10thousand.push(i)
if (i <= 20_000) dayNumbers_20thousand.push(i)
if (i <= 30_000) dayNumbers_30thousand.push(i)
if (i <= 50_000) numbers_50thousand.push(i)
}

export const CHART_DATA = {
xAxis: {
weekdays: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
},
series: {
dayNumbers: [1, 2, 3, 4, 5, 6, 7],
dayNumbers_100thousand: dayNumbers_100thousand,
dayNumbers_50thousand: numbers_50thousand,
dayNumbers_30thousand: dayNumbers_30thousand,
dayNumbers_20thousand: dayNumbers_20thousand,
dayNumbers_10thousand: dayNumbers_10thousand,
dayNumbers_5thousand: numbers_5thousand,
dayNumbers_1thousand: numbers_1thousand,
},
}

export const CHART_COMPOSITOR_DATA = {
data1: [1, 2, 3, 4, 5],
data2: [1, 3, 2, 5, 4],
data4_thousand: numbers_4thousand,
data5_thousand: numbers_5thousand,
data50_thousand: numbers_50thousand,
}
66 changes: 66 additions & 0 deletions packages/charts/src/benchmarks/barChart.bench.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { beforeAll, bench } from 'vitest'
import { Chart } from '../components/chart'
import { render } from '@vtex/shoreline-test-utils'
import { CHART_DATA } from './__fixtures__/chartData'

beforeAll(() => {
Object.defineProperty(HTMLElement.prototype, 'clientWidth', {
configurable: true,
value: 300,
})
Object.defineProperty(HTMLElement.prototype, 'clientHeight', {
configurable: true,
value: 200,
})
})

bench(
'renders bar chart with 1 thousand points',
async () => {
const { unmount } = render(
<Chart
series={[{ data: CHART_DATA.series.dayNumbers_1thousand }]}
chartConfig={{
type: 'bar',
}}
style={{ width: '100%', height: '100%' }}
/>
)
unmount()
},
{ iterations: 300 }
)

bench(
'renders bar chart with 5 thousand points',
async () => {
const { unmount } = render(
<Chart
series={[{ data: CHART_DATA.series.dayNumbers_5thousand }]}
chartConfig={{
type: 'bar',
}}
style={{ width: '100%', height: '100%' }}
/>
)
unmount()
},
{ iterations: 300 }
)

bench(
'renders bar chart with 10 thousand points',
async () => {
const { unmount } = render(
<Chart
series={[{ data: CHART_DATA.series.dayNumbers_10thousand }]}
chartConfig={{
type: 'bar',
}}
style={{ width: '100%', height: '100%' }}
/>
)
unmount()
},
{ iterations: 300 }
)
84 changes: 84 additions & 0 deletions packages/charts/src/benchmarks/chartCompositor.bench.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import { beforeAll, bench } from 'vitest'
import { render } from '@vtex/shoreline-test-utils'
import { CHART_DATA } from './__fixtures__/chartData'
import { ChartCompositor } from '../components'

beforeAll(() => {
Object.defineProperty(HTMLElement.prototype, 'clientWidth', {
configurable: true,
value: 300,
})
Object.defineProperty(HTMLElement.prototype, 'clientHeight', {
configurable: true,
value: 200,
})
})

bench(
'renders a chart compositor of bar and line chart both with 1 thousand points',
async () => {
const { unmount } = render(
<ChartCompositor
charts={[
{
series: { data: CHART_DATA.series.dayNumbers_1thousand },
chartConfig: { type: 'line' },
},
{
series: { data: CHART_DATA.series.dayNumbers_1thousand },
chartConfig: { type: 'bar' },
},
]}
tooltip={{ type: 'line' }}
/>
)
unmount()
},
{ iterations: 300 }
)

bench(
'renders a chart compositor of bar and line chart both with 5 thousand points',
async () => {
const { unmount } = render(
<ChartCompositor
charts={[
{
series: { data: CHART_DATA.series.dayNumbers_5thousand },
chartConfig: { type: 'line' },
},
{
series: { data: CHART_DATA.series.dayNumbers_5thousand },
chartConfig: { type: 'bar' },
},
]}
tooltip={{ type: 'line' }}
/>
)
unmount()
},
{ iterations: 300 }
)

bench(
'renders a chart compositor of bar and line chart both with 10 thousand points',
async () => {
const { unmount } = render(
<ChartCompositor
charts={[
{
series: { data: CHART_DATA.series.dayNumbers_10thousand },
chartConfig: { type: 'line' },
},
{
series: { data: CHART_DATA.series.dayNumbers_10thousand },
chartConfig: { type: 'bar' },
},
]}
tooltip={{ type: 'line' }}
/>
)
unmount()
},
{ iterations: 300 }
)
Loading