Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Print Layout Atlas Mode, Date string arrays are interpreted as non-numeric fields for Scatter Plot #339

Open
jo-chemla opened this issue Oct 20, 2023 · 0 comments
Labels

Comments

@jo-chemla
Copy link

Describe the bug
Using the data-plotly plugin is incredibly useful, both during standard interaction with the data as well as within the Print Composer, so thanks a lot for that!
I've been trying using a data-plotly plot in Atlas mode in the Print Composer, and encountered the following issue. Dates which are stored as string lists (inside a vector layer where each single feature has one attribute which is a list of (0 to N) strings) are not interpreted as numeric values by data-plotly. The X Field can be set to attribute(@atlas_feature , 'dates'), but on the screenshot, we can see that the dates are plotted each in its own column rather than at the correct position on the X axis.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new vector scratch layer that contains an attribute with type list of strings, and enter some dates formatted as YYYY-MM-DD.
  2. Enable atlas mode, use the vector layer as the atlas coverage layer, Add a Data-Plotly Item
  3. Set the plot-type to scalar plot, X field to attribute(@atlas_feature , 'dates')
  4. See error

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 11
  • QGIS release QGIS 3.30
  • DataPlotly 4.0.3 updated at mar. juin 27

Additional context
When producing a scatter plot (in or outside of the print composer) with a layer which has a property that is a QDate or ISO-string (each feature has a single date as attribute, not a string list as attribute), then the dates are correctly interpreted as numeric values and correctly spaced.

@jo-chemla jo-chemla added the bug label Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant