Dynamic creating options

I need to make dynamic configuration of Panel Option.

1.What I need :slight_smile:
The data structure: [ { name: A} , { name: B}, { name: C}, { name: A}, { name: C} ] etc.
From data I need to get unique names and FOR EACH unique name I need to make

  • Select,
    -Boolean,
    -Number imput ect.

After that I would need to structure data like this for each unique name an object with those option values. That would look like this :
options:
{
A:{
select: selected option,
boolean: true,
input: 4
},
B :{
select: selected option,
boolean: false,
input: 1
}, …
}

So my idea is to make .addCustomEditor and component which would handle this behaviour. And yes I have already made for each uniqe name select, boolean field etc. but the problem is I don’t know how get this data to Panel component. So where the graph get’s render.

I would like to know is there another apporach how would you handle this and if you took same apporach as me how would you pass data to the component (default name if you are creating data visualization is SimplePanel.tsx)

down below are screenshots just showing apporach the code is not even close to it should be but just you can have better understanding.

  1. moudle.ts

    2.FieldSelectEditor.tsx

    3.SimplePanel.tsx- how the data should look like in real

And this is how it should look like in the UI
so first set would represent series A and other series B etc.

Hi @davidkramer12 is this question still open? I see in addCustomEditor editor component doesn't render you managed to create a custom editor

no but i have manges to make workout around and stucture data in SimplePanet the i over ride it with values when you open graph…

If you have any suggestion how to approach this in diffrent way please tell me

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.