Dynamically Creating pens

Hi there,

I’m sure there is a way to do this, but it’s out of reach for my tiny brain. Here’s the deal:

I have a db table that has the columns “activity”, “sensorId”, “datetime”, and “value”.

I have a table that is displaying the all of the activities, and when a user chooses one, I capture the activity in a root container custom property.

I now want to create a chart that displays the value for each sensorId against datetime in the selected activity. I’m finding this to not be trivial. The number of sensorIds does vary between activities.

Here are the specific questions I have:

How do I create a varying number of pens?

How do I create pens to display the “value” column for each sensorId? I’d like the pen to be named the sensorId

Any help is greatly appreciated.

Mike

check out the dbpens on the easy chart, you should be able to use that to properly display your data on a chart. from there, you just need to use scripting to create the datasets that the easy chart uses, like dbpens, axis, and subplots.

see if you can get the dbpen functionality to work using the easy chart customizer. If you can get that to work to display your data and you need osme help writing script to create the datasets, come back and post some more info.

Thanks for that. I got it happening.