Problem/Motivation
This might be a feature request instead of a bug report. What I'm wanting is to create a time-series plot with connected points. It's cumulative, so if there are multiple points with the same x-value, they should all be plotted (with different y-values). I'm using your View Cumulative Field module to get the y-values :)
If this is a feature request, it's that I'd like to be able to connect the points in a scatterplot.
Looks like for Plotly, though, line plots are just connected scatterplots, so a line plot should do what I want. And it mostly does (see below plot).

Side note: this behavior is different than a few of the other plotting backends I tried with Charts - most of them treated the dates as a category and not a true x-value. I personally prefer Charts Plotly's behavior, but I may be biased because it's what I need...
The problem is that identical x-values (dates) are getting merged together at some level (in Charts?). This results in x and y series of different lengths (observed via the Charts debug output), and not all of the data gets plotted/some data gets plotted incorrectly. For my particular case, this problem gets more pronounced if I use a less granular date representation for the x-values. Here's the same data but using the "HTML month" formatter instead of "HTML datetime":

I'm not doing any aggregation in the View.
Anyway, short version: I think that if Plotly's line plots behave this way (which I like!), then Charts should not be attempting to group the data in a line plot (if that's what's going on).
Steps to reproduce
Create a line plot with a data series that has points with identical x-values. View the Charts debug output to see x- and y-vectors of different lengths.
Proposed resolution
Don't merge duplicate x-values in line plots.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | dummy_dataset_view_config.yml | 7.91 KB | andileco |
| #3 | dummy-dataset-views-ui.png | 152.8 KB | mwymore |
| #3 | views.view_.dummy_dataset.yml | 6.22 KB | mwymore |
| #3 | dummy_dataset.csv | 47 bytes | mwymore |
| Screenshot 2025-11-11 092214.png | 37.7 KB | mwymore |
Issue fork charts_plotly-3557178
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
andileco commentedThis is interesting. A few requests:
Would you be able to create a CSV of dummy data that could be used for testing?
Could you replicate your view with the Views CSV Source module?
Could you then share your View configuration?
If not, could you just share your View configuration? In particular, I'm interested to see if you're using the "Group by" option on your date field.
Comment #3
mwymoreI uploaded a dummy_dataset.csv and a view configuration and a screenshot of my Views UI. Let me know if I can provide anything else. Thanks.
Comment #5
andileco commentedPlease import this modification of the view and test with the MR. Would this work for you?
Comment #6
mwymoreYes, this is great! It also works with my original dataset. Thank you.
Comment #7
andileco commented