frolic-react icon indicating copy to clipboard operation
frolic-react copied to clipboard

Add Support for Custom Metrics and Dimension Names

Open arihantparsoya opened this issue 2 years ago • 6 comments

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

arihantparsoya avatar Aug 13 '23 03:08 arihantparsoya

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

Tabhi109 avatar Aug 13 '23 08:08 Tabhi109

Done

arihantparsoya avatar Aug 13 '23 08:08 arihantparsoya

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

Tabhi109 avatar Aug 13 '23 08:08 Tabhi109

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

arihantparsoya avatar Aug 13 '23 08:08 arihantparsoya

Thank you , Now I will work on it !

Tabhi109 avatar Aug 13 '23 08:08 Tabhi109

@arihantparsoya pull-request raised for the issue

Tabhi109 avatar Aug 13 '23 11:08 Tabhi109