pass entity data manually as an array/list in highcharts json

Hi,
I have an entity as below image. Is there any way I can pick data manually and pass it in highcharts json for eg : return value of Oct_21 where backlog = 'closed' or something in this manner ?

Entity :

Highcharts json (currently using static data) :

series: [{
        name: 'Created',
        type: 'column',
        data: [245,223,190,271,200,243],
        color: 'grey'
    }, {
        name: 'Closed',
        type: 'column',
        data: [222,169,180,239,176,287],
        color: 'orange'
    }, {
        name: 'Backlog',
        type: 'spline',
        data: [116,170,180,212,236,192],
        color: 'blue'
    }]

Is there any way that I can write (in below code, i'm explaining that is it possible to call some function or an event that fetches data based on 2 parameters (backlog, index) and create a array/list and pass it in highcharts) :

data : [ getData(backlog='Created',array[0]), getData(backlog='Created',array[1]), getData(backlog='Created',array[2]) ]
Solution

I was able to solve this by creating local variables on screen, then calling a server action in a client action and assigning values to the variables in the same client action. Then passing those variables as array in highcharts. Refer images below.

Server action - I created server action that returns the required data and creates a new entity. In this server action, I assign values to variables.

In the same server action, i then assigned the values to itself with square brackets.
Client action - then I assigned the values  (now in array format) to variables.


Highcharts - I passed those variables to data parameter so that it reflects as an array of values and plots them.

Hey @Laura Fidalgo ,

Thank you for your answer, I could solve the issue by creating variables, assigning them values on client action by getting values from server action, then passing those variables in highcharts. This works perfectly now.


Regards,

Aman

Solution

I was able to solve this by creating local variables on screen, then calling a server action in a client action and assigning values to the variables in the same client action. Then passing those variables as array in highcharts. Refer images below.

Server action - I created server action that returns the required data and creates a new entity. In this server action, I assign values to variables.

In the same server action, i then assigned the values to itself with square brackets.
Client action - then I assigned the values  (now in array format) to variables.


Highcharts - I passed those variables to data parameter so that it reflects as an array of values and plots them.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.