Forum Discussion
Custom visual with aggregated values
Hi ana-pierola,
For any visuals that need to calculate statistics over values and aggregate them, all underlying values need to be provided to the visual dataset so that they can be computed internally. Visuals are not able to know more about the model than what is supplied to the visual data roles and data view mapping (dataset).
In the case of a histogram, you will need to also supply a grouping column/field to your dataset that ensures each row is unique, such as an identify column, otherwise you will not be able to derive the correct values. Note that if you supply lots of data you may need to ensure that you can work with the row limits.
The Violin Plot visual uses this approach also, and I've written a post to explain thy this is necessary here, which may help you to understand how visuals need their data to be able to aggregate it themselves.
Regards,
Daniel