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

Feat/adding custom label and dimensions names

Open Tabhi109 opened this issue 2 years ago • 7 comments

  • added types labelNames and dimensionsNames in the interface ChartInterface
  • added Tooltip for viewing the custom Label & Dimension Names.
  • ran it on storybook

Tabhi109 avatar Aug 13 '23 10:08 Tabhi109

We need it for all the charts which has X and Y Axis.

arihantparsoya avatar Aug 13 '23 11:08 arihantparsoya

Refer to recharts documentation https://recharts.org/en-US/api/YAxis#label

arihantparsoya avatar Aug 13 '23 11:08 arihantparsoya

Okay got it !

Tabhi109 avatar Aug 13 '23 11:08 Tabhi109

added names functionality in all the charts with x and y axis

Tabhi109 avatar Aug 14 '23 15:08 Tabhi109

Can you explain why you have decided to use Tooltip for Axis labels?

Axis labels can be defined inside the axis tags themselves: https://recharts.org/en-US/api/YAxis#label

arihantparsoya avatar Aug 15 '23 05:08 arihantparsoya

@arihantparsoya I added the names using the ToolTip component so that It will be more interactive for users as well as a Cleaner UI will be maintained when there will be a large set of data, but as you want this to be in Axis itself, I will work on it!

Tabhi109 avatar Aug 15 '23 16:08 Tabhi109

Yes, the the axis is the main thing, user should be able to know the axis without using the tooltips.

Can you share a screenshot of the tooltip after your modified code?

I would suggest keep the tooltip changes in separate branch and focus only on the axis for not. because tooltip is defined in other locations as well.

arihantparsoya avatar Aug 15 '23 16:08 arihantparsoya