Skip to main content
15-Moonstone
March 25, 2020
Solved

Time series chart with check box

  • March 25, 2020
  • 1 reply
  • 1029 views

I need to display the values of current, voltage and power in time series chart based on the check box selection. How to do this?.

i) If I select Current, only Current values will be displayed in time series chart.

ii) If I select Current and Voltage, both the values should be displayed in time series chart. 

iii) If I select Current, Voltage and power all the values should be displayed in time series chart.

iv) If I deselect any one it should not be displayed in the chart.

I have designed up to this and stuck after this,

 
 
 
 
 
 
 
 
 
 
 
 

check_box.PNG

Best answer by raluca_edu

Hi,

 

As far as I understood you managed to get the dynamic thing, but you need to implement the service that is showing the data in the chart.

For that you need to do a service that has 3 inputs: Current, Voltage and Power. These are actually values taken from the checkboxes, either true or false.

In the service you check the values: if Current is true and the others are false, you will get only data for current, 

else if Current and Voltage are true and Power false - get data only for Current and Voltage

else if all values are true - get data for all 3 values.

 

The result will be only one, an infotable (probably the datashape should be assigned from the service itself, if it is different for the 3 cases).

 

After this, just do the bindings: Changed event will trigger your new service.

 

Probably, there are other ways to do the implementation, but this is what came into my mind.

 

Hope it helps,

Raluca Edu

1 reply

raluca_edu
17-Peridot
March 25, 2020

Hi,

 

As far as I understood you managed to get the dynamic thing, but you need to implement the service that is showing the data in the chart.

For that you need to do a service that has 3 inputs: Current, Voltage and Power. These are actually values taken from the checkboxes, either true or false.

In the service you check the values: if Current is true and the others are false, you will get only data for current, 

else if Current and Voltage are true and Power false - get data only for Current and Voltage

else if all values are true - get data for all 3 values.

 

The result will be only one, an infotable (probably the datashape should be assigned from the service itself, if it is different for the 3 cases).

 

After this, just do the bindings: Changed event will trigger your new service.

 

Probably, there are other ways to do the implementation, but this is what came into my mind.

 

Hope it helps,

Raluca Edu

Sruthi15-MoonstoneAuthor
15-Moonstone
March 26, 2020

Thanks for the reply. It worked.