You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Create a new vector scratch layer that contains an attribute with type list of strings, and enter some dates formatted as YYYY-MM-DD.
Enable atlas mode, use the vector layer as the atlas coverage layer, Add a Data-Plotly Item
Set the plot-type to scalar plot, X field to attribute(@atlas_feature , 'dates')
See error
Screenshots
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.
The text was updated successfully, but these errors were encountered:
Hi there, any pointer would be very much appreciated in order to try to solve this bug. Seems that the core/plot_types/scattercreate_trace method creates a graph_objs.Scatter( x=settings.x, ...) where settings is built from core/plot_factory.py, eg the settings.x=xx list is filled with x = x_expression.evaluate(context).
Might indicate that there is an expression that could be written to parse dates correctly on dataplotly depending on qgis cvector layer properties/column types.
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:
vector scratch layer
that contains an attribute with typelist of strings
, and enter some dates formatted as YYYY-MM-DD.attribute(@atlas_feature , 'dates')
Screenshots
Desktop (please complete the following information):
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.
The text was updated successfully, but these errors were encountered: