7.9 SDL: UIViewChartMetricsHistogram throwing an error at data.whenLoaded

I’m trying to put a histogram in a 7.9 UI page, but seems the new UIViewSDLLineBarChart component only supports a time-series look at the data. When I try to use the UIViewChartMetricsHistogram component from within a UIReactBase container component, I get an error like this:

UIViewChartMetricsHistogram.js:666 Uncaught TypeError: data.whenLoaded is not a function

Is this a mis-configuration on my end, or are there different steps to configure the UIViewChartMetricsHistogram component in 7.9? Alternatively, is there is a new SDL component that will render a histogram?

Correct, UIViewSDLLineBarChart only supports evalMetrics in 7.9. It’s also @beta, and we are currently refactoring it to support other types of data, such as categorical data (categories on the x-axis).

UIViewChartMetricsHistogram is the component you’re looking for—there’s no SDL equivalent yet, but stay tuned!

Are you sure you’re passing the correct type of data sources to UIViewChartMetricsHistogram? Check out the type-level documentation for more information.

Thanks Matt. I ended up getting the UIViewChartMetricsHistogram to render, and it was a data source issue.

Follow-up question:
– Moved to a new post – 7.9 SDL: Filtering in dataSource fetch for UIViewChartMetricsHistogram