formtools / module-data_visualization

The Data Visualization module.
https://docs.formtools.org/modules/data_visualization/
7 stars 9 forks source link

Field charts don't display data if field is linked to another form #15

Closed tilleul closed 5 years ago

tilleul commented 5 years ago

When a field contains a reference (id) to data in another form, then this field displays nothing when used in field chart.

Exemple:

If I want to create a pie chart to see the amount of each brand in my inventory, it displays "no data". Note that it DOES work if the brand field is linked to an option list. Also it does work if the brand field is not linked to anything and is just a text field for example.

Am I missing something ? Thanks for your time.

benkeen commented 5 years ago

Hey @tilleul, sorry for missing your post. No, you're not missing anything - this just isn't currently supported by the module. What should happen is that it should detect any form fields that are using a separate form as the data source, and omit them from the UI so you can't select them in the first place.

Ideally I'd like to add the feature as you need, but the existing way of mapping forms together like this is extremely basic and I want to add something more robust and feature complete down the road. So I'm very reluctant to add in one more feature that I know I'll have to remove down the road.

Sorry about that, @tilleul. I'll update the UI in the next version to no longer offer those fields as I described.