Start/end/interval data from UI page to feed eval metric


#1

I have a ui page where the default set of data displayed for the risk score is one month when HOUR interval is selected.
I want to set the default at 2 months.
In the xxx.ui file the spec for the eval metric called by the ui doesn’t contains any info about start/end/interval…I suppose these valuse are passed at run time by ui from calendar and dropdown menu’.
I’m not able to figure out where I can change this default value


#2

Support you are using UsageAndEvent chart.

start/end/interval configuration are specified on component level.

In below example, start/end are specified through startDate/endDate, and interval config is specified through
intervalOptions.

{
        "id": "MyChart",
        "component": "UsageAndEvents",
        "dynamicDateRange": true,
        "startDate": {
            "referenceConfig": ["start", "day"],
            "direction": "before",
            "number": 2,
            "unit": "month"
        },
        "endDate": {
            "referenceConfig": ["start", "day"]
        },
        "intervalOptions": {
          "value": [
                { "text": "Day",   "id": "DAY"   },
                { "text": "Month", "id": "MONTH" },
                { "text": "Year",  "id": "YEAR"  }
            ]
        },
        "series": [{
            "id": "mySeries",
            "name": "Series 1",
            "data": {
                "c3type": "myType",
                "c3function": "evalMetric",
                "c3arguments": {
                     "spec": {
                            "id": "{{params.id}}",
                             "expression": "myExpression"
                      }
                },
               "collection": false
             }
       }]
}