record.getData() in UIViewUsageAndEvents


I have a UIViewUsageAndEvents where I declare a call to an evalMetric (see below). The UsageAndChart component is incapsulated into a UIViewDetailTab …
when clicking on the “button” the should calls the evalMetric I get an error from the onLegendClick function in UIViewUsageAndEvents.js - the error is here record.getData(‘id’)
–> getData is not a function.

The UIViewTabPanel is into a dashboard page that define a datasource and within the UIViewTabPanel i declare a collection like this

                "data": {
                    "record": "record"

This is the called eval metric in usageandevents

                "id": "Usage",
                "isTimeseries": true,
                "name": "{}",
                "data": {
                    "c3type": "MyType",
                    "c3function": "evalMetric",
                    "c3arguments": {
                        "spec": {
                            "id": "{{}}",
                            "expression": "MyExpression"
                    "responseTransform": null,
                    "collection": false
                "color": "#f0a63a",
                "unit": "kWh",
                "chartType": "line",
                "axis": "{~MyApp.chart.consumption.axis~}",
                "tooltipGroup": "usage",
                "hasPriorPeriodSeries": false,
                "disabled": true,
                "priorPeriodSeriesConfig": {
                    "color": "#d68510"


fixed putting collection : instead of record : in Dashboaord page