UIViewChartMetricsHistogram with chartingType set to maxValue


I’ve a UIViewChartMetricsHistogram as depicted below

Here is the configuration:

                        "title": "{~EnergyManagement.Benchmark.BenchmarkTabs.MetricsHistogram.title~}",
                        "component": "UIViewChartMetricsHistogram",
                        "exporting": true,
                        "pointPath": "energymgt/facility/",
                        "histogramMetric": {
                            "metricName": "billedElectricityConsumption"
                        "data": {
                            "itemsDataSource": "facilitiesDataSource",
                            "histogramDataSource": "histogramDataSource"
                        "autoExecute": true,
                        "tooltipBeneathColumns": false,
                        "names": [
                        "chartingType": "maxValue",
                        "pointWidth": 100,
                        "enableDrilldown": true,
                        "nameField": "buildingNameAnswer"

How are those bars calculated? As you can see in the picture all percentiles are set to 0 except the last one 75 to 100!!!


The y-axes for the bars are set as

'y': metricValues[bucket.ids[bucket.count - 1]] ? metricValues[bucket.ids[bucket.count - 1]].data[0] : 0,

in UIViewChartMetricsHistogram.js for maxValue. It looks like it only returns one value for each bucket, which makes sense, but I don’t know why it would be zero for everything else. If you change it to "chartingType": "value" do you see bars for the lower buckets or are they all zero?


When I click on the bar corresponding to 75-100 percentile I see it also contains buildings with 0 consumption (see below) so the question is how/why it is constructing those buckets?


Yes, the behavior you see for "chartingType": "maxValue" makes sense given the behavior for "chartingType": "value". The UI component is rendering correctly given the API results. You should investigate the metric values from the API.

1 Like

thanks @matt you were right, it turns out the data had a long tail shape and all buildings with data were gathered in the 75-100 percentile.