Props {
/**
* Entity for metrics
* @default REVENUE
*/
type? : 'USAGE' | 'REVENUE'
/**
* Title for the metrics
*/
label : string
/**
* Data options for metrics
*/
metricsInputs : {
ACCOUNT_ID : string[] | {
source?:
| {
from?: 'organization'
queryParams?: Record<string, any>
}
| {
from: 'map',
options: { [accountId: string]: string }`
}
}
DATE_RANGE : [number,number]
USAGE_METER_ID : string[] | {
hidden : boolean
source : {
from : 'pricing_schedule'
accountId : string
} | {
from : map
options : { [usageMeterId : string] : string }
}
}
},
/**
* Options for rendering the chart
*/
datasetsOptions?: {
colorPalette: string[]
},
/**
* Transformations to apply to the chart data
* CUMULATIVE : add up all the previous data points
* SORT : sort data by date
*/
chartDataTransformations? : <'CUMULATIVE' | 'SORT'>[]
}