react-native-pathjs-charts icon indicating copy to clipboard operation
react-native-pathjs-charts copied to clipboard

Custom access functions for the LineChart?

Open ghost opened this issue 8 years ago • 2 comments
trafficstars

LineChart hard codes (lines 71-75, 79-80) the accessor function that it passes to the underlying chartType.

The ability for the using code to pass an alternative set of functions would enable more flexibility for the data structure passed in.

Maybe fall back to this default if a function is not passed.

ghost avatar Feb 07 '17 21:02 ghost

Interesting. Bar, Pie, and Radar all have an accessor function and fallback to accessorKey like you suggest above while Line (SmoothLine & StockLine) and Scatterplot only use accessorKey. I never realized this inconsistency existed, so thanks for pointing that out.

Would you be willing to submit a PR to clean this up?

marzolfb avatar Feb 08 '17 13:02 marzolfb

Yeah I can do a PR. At the moment I'm wrestling with a bigger issue but not sure if it has anything to do specifically with the package or something in my environment. But right now the line chart is only drawing the X axis. Bizarre. Was working before. Trying to trace that down. But, I digress. Yes. I will try to create a PR for this access function thing.

ghost avatar Feb 08 '17 14:02 ghost