const quantilesResult = ChartEditor.getLoadedData().lunapark_api;
var params = ChartEditor.getParams()
//console.log('Data', quantilesResult);

module.exports  = {
        graphs: [   
        {
            yAxis: 0,
            type: 'area',
            id: 'p100',
            title: '100%',
            visible: false,
            data: quantilesResult.cases[params.case_id]['100']
        },
        {
            yAxis: 0,
            type: 'area',
            id: 'p99',
            title: '99%',
            visible: false,
            data: quantilesResult.cases[params.case_id]['99']
        },
        {
            yAxis: 0,
            type: 'area',
            id: 'p98',
            title: '98%',
            data: quantilesResult.cases[params.case_id]['98']
        },
        {
            yAxis: 0,
            type: 'area',
            id: 'p95',
            title: '95%',
            data: quantilesResult.cases[params.case_id]['95']
        },
        {
            yAxis: 0,
            type: 'area',
            id: 'p90',
            title: '90%',
            data: quantilesResult.cases[params.case_id]['90']
        },
        {
            yAxis: 0,
            type: 'area',
            id: 'p85',
            title: '85%',
            data: quantilesResult.cases[params.case_id]['85']
        },
        {
            yAxis: 0,
            type: 'area',
            id: 'p80',
            title: '80%',
            data: quantilesResult.cases[params.case_id]['80']
        },        
        {
            yAxis: 0,
            type: 'area',
            id: 'p75',
            title: '75%',
            data: quantilesResult.cases[params.case_id]['75']
        },
        {
            yAxis: 0,
            type: 'area',
            id: 'p50',
            title: '50%',
            data: quantilesResult.cases[params.case_id]['50']
        },
        {
            yAxis: 1,
            type: 'line',
            id: 'rps',
            align: 'high',
            title: 'rps',
            color: 'brown',
            opacity: 1,
            data: quantilesResult.responses_per_second
        }
    ],
    categories_ms: quantilesResult.ts
}
