How to make the Series Address in a Highchart change dinamically

Created by Vester Business Support Team, Modified on Mon, 7 Dec, 2020 at 10:17 PM by Vester Business Support Team

When working with Highcharts you can change the Series BASE address using a script in a button.


In this example Series1 Address gets changed to an specific tag.


Once the parameters are set then you display the highchart in an iFrame


Example

var parames = {};


parames.series1series_address =  "AGENT.OBJECTS.Carpeta.Temperatura";

parames.series1series_name = "Temperatura";

        

webMI.display.openDisplay("SYSTEM.LIBRARY.PROJECT.OBJECTDISPLAYS.Advanced.Higcharts.highcharts", parames, "chartsframe");



This scripts runs in a Dynamic when Mouse Click then Run Script.


Here is an example on how to pass the "Label" and "Base" parameters to a Gauge


var params = {}

var lecturatexto = ["AGENT.OBJECTS..LabelDinamico","AGENT.OBJECTS..BaseDinamico"];


webMI.data.read(lecturatexto, function(e){

     {params.label = (e[0].value)};

      {params.base = (e[1].value)};

     //{alert("label value es  " + " " + labelvalue)};

     

          {webMI.display.openDisplay("SYSTEM.LIBRARY.ATVISE.OBJECTDISPLAYS.Advanced.gauge", params, "chartsframe")};


 });


In the previous example the TEXT for the paremeters is read from String tags. 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article