Hey @alex4 , thanks for taking the time to develop the plugin and answering all of our questions! I’m having some trouble making my use case work and was wondering if you had any suggestions on how to implement it.
In short, I’m trying to create this chart:
For some context - Each point corresponds to a specific unit of an apartment building, with the X-axis being the date on which it was rented and the Y-axis being the price at which it was rented. We show this chart on a page that represents a single building (which can have multiple unit types, like a 1 Bed 1 Bath or a 2 Bed 1 Bath), with the colour dimension representing the various unit types in that building. Lastly, we need the users to be able to filter the chart such that they can see just 1 unit type if they so choose - currently we use a drop down to allow the user to make this selection.
Some complications I’ve run into that I haven’t been able to resolve with about an hour of research and testing:
How can we use dates as the X-Axis values? It seems that the plugin doesn’t like that the X-axis values we passed were dates. The chart currently looks like the screenshot below. I suspect whats happening is that since the plugin expects the X-axis to be continuous numerical values, and doesn’t have functionality to convert Dates into a Unix Timestamp, it just defaults all the X-axis values to 0. I suppose we could rework our database to include a timestamp field, but then our X-axis labels wouldn’t be user-readable as it too would be a timestamp. I looked around quite a bit but I don’t believe there’s a way to convert a timestamp in the label field into a date directly in the plugin.
How can we dynamically set the minimum value for X-axis, with X-axis as dates? For some buildings we have limited historical data, say 3 months, whereas for others we may have 6 months or more. We’d like to be able to set the minimum value on the X-axis dynamically according to what the earliest date a unit in that building was rented, in order to limit the chart to the range of dates for which we have data for a given building. This seemed like it would be fairly straightforward (and I believe it would be if the X-axis wasn’t a date), but we couldn’t get the plugin to accept a date as the minimum X-axis value which is probably related to the first issue.
How can we filter and/or toggle between series using a dropdown? Finally, as mentioned above we need our users to be able to interact with the chart by filtering specific unit types using a dropdown. Essentially they should be able to see just the orange points, or just the green points (referring to the original screenshot of the desired chart above, reminder that colours == unit types) should they so choose, with the default being that all unit types are shown on initial page load.
I know these are probably a bit more complicated than the normal use case for this plugin, so if the answer is “not in scope” then I understand. If however there’s a fairly straightforward way we could do this given the current plugin, and/or some quick fixes we could help deploy that allow for these functionalities we would love to work with you to make it happen - thanks in advance for your thoughts and advice!