esnet / react-timeseries-charts

Declarative and modular timeseries charting components for React
http://software.es.net/react-timeseries-charts
Other
861 stars 284 forks source link

ChartRow should have one and only one <Charts> tag within it? Why? #406

Closed jtiscione closed 5 years ago

jtiscione commented 5 years ago

❔Question

Provide your question, code sample Or other information that will help in solving here

I'm trying to create a grid of M x N plots, each with its own y axis, but all sharing a legend with the same keys and colors.

So I've got M ChartRows and I'm trying to add N columns to ChartRow. But it complains that a ChartRow can have one and only one Charts tag, so in each row all N charts are going to get plotted on top of each other. How am I supposed to put more than one chart on a row?

Or does the library only support multiple rows and not multiple columns? That's a weird limitation.

pjm17971 commented 5 years ago

The library doesn't support multiple charts on a row. Sorry.

jtiscione commented 5 years ago

OK- but an arbitrary restriction like that definitely belongs in the documentation, not just hidden in an error message you won't expect at all until you finish writing the code and start testing it. Maybe I missed it.

Are there any complications with using one Resizable/ChartContainer per column, and laying them out in a div using flex? I don't see why that wouldn't work.

jtiscione commented 5 years ago

OK, I can implement multiple columns using separate ChartContainers and it works well.