frolicorg / frolic-react

React Component Library to Build Analytics Dashboard 10x Faster
https://www.frolicorg.com/frolic-react/docs
Apache License 2.0
64 stars 3 forks source link

Add Support for Custom Metrics and Dimension Names #3

Open arihantparsoya opened 1 year ago

arihantparsoya commented 1 year ago

When the user adds the data to the charts, he needs to set the metric and dimension attribute according to the attribute names present in data.

It is possible that the user wants to give different names to these labels and dimensions. For which we need to create another optional input attributes called labelNames and dimensionNames. When the user sends these attributes, we need to use these attributes to display in the UI

Tabhi109 commented 1 year ago

@arihantparsoya , Can you please assign it to me , It will be my first contribution.

arihantparsoya commented 1 year ago

Done

Tabhi109 commented 1 year ago

@arihantparsoya , can you please explain me a little bit more , where exactly I have to make changes , I have read the code.

arihantparsoya commented 1 year ago

You need to add new parameters in ChartInterface

https://github.com/frolicorg/frolic-react/blob/main/src/components/utils/ChartInterface.tsx

ChartInterface is the base for the AreaChart parameters:

https://github.com/frolicorg/frolic-react/blob/main/src/components/graph/AreaChart/AreaChart.types.ts

Then you can add functionality inside AreaChart:

https://github.com/frolicorg/frolic-react/blob/main/src/components/graph/AreaChart/AreaChart.tsx

Tabhi109 commented 1 year ago

Thank you , Now I will work on it !

Tabhi109 commented 1 year ago

@arihantparsoya pull-request raised for the issue