I’m using apache echarts and I have the following code:
echartsInstance.off("click");
echartsInstance.on("click", (params) => {
console.log("Clicked column name is:", params.name);
$testing = params.name
console.log("The variable name is:", $testing)
});
After the last line, I want to be able to refresh the entire dashboard or even specific visualisations so that the new variable is applied to the chosen visualisations and filtered upon.
@zyan It’s described in the documentation. When you update variables using locationService dashboard will refresh automatically. Nothing else is required.
Hi,
Thank you for your reply.
I have similar requirements.Preformatted text
Somehow I use locationService to set the variables dynimacally, it partly works and I can see the URL contains necessary GET parameters. However the dashboard does not refresh and so visualizations stay unchanged. I am using on click event, setting two variables that are otherwise are set by OpenSearch query.
here is th code:
echartsInstance.on("click", function (params) {
line = params['name'];
plant = replaceVariables("$Plant");
locationService.partial({ "Plant": plant }, false);
locationService.partial({ "Line": line }, false);
});```
Hi, Just wanted to share a small update here.
It looks like to set variable and to reload the visualization we have to specify: locationService.partial({ "var-Line": line }, true);
instead of locationService.partial({ "Line": line }, true);