Skip to main content
1-Visitor
August 16, 2016
Question

How to show multiple things on the same mashup page

  • August 16, 2016
  • 1 reply
  • 7888 views

Let's say I have a mushup with the following widgets:

  • Google map
  • grid
  • Chart temperature vs time

through those three widget I can see all my 25 things in the same time.

Let's say, then, I want to see only some of those 25 things and have the chance to chose dynamically which ones; so, for instance, now I chose to see only things 5, 11, 18 and 23 and I want google maps only show me those markers and chart only shows me those lines.

Is it possible (and if so, how) to do this?

My clue is

  • add a property to the things called "showme" which is a boolean (default set as true).
  • Then in my grid I have the chance to change showme value.
  • Add a state formatting in Google map which depends on showme. If it is true, show me the marker, otherwise, don't
  • (Don't know if I can do the same with the chart)

My problem is:

To see my data into the grid I used the service: getImplementedThingsWithData but this service only allows me to see Data values and not the change them. I don't know what service may I use since all I know (like SetProperties) is referred to the single thing and not to all of them together.

(If you have a better solution is well accepted)

1 reply

14-Alexandrite
August 16, 2016

Have you tried to use the DataFilter widget? It can be used to filter out the unwanted things. You can use it as an input to a "GetImplementingThingsWithData" service and it will filter out the unwanted things.

Another approach would be a List widget populated by the "GetImplementingThings" service and the selected rows feeding your services to populated the grid/map/timeseries widget.

Cheers

Ewerton

fmanniti1-VisitorAuthor
1-Visitor
August 18, 2016

Thank you very much.

I actually had to use both of the solutions because with the DataFilter widget I cannot (or I don't know how to do) select more than one thing from their name.

With the second solution I can't make queries like "Temperature > x".

Just have one question:

About your second clue, the one that says to use the List widget and populate my grid with Selected rows.

My question is, in this way I have the list widget with first row autoselected so, when I first open my mashup, on my grid I only have one data, the first one.

Is it possible to make the opposite? That means, I have my grid fully populated in the first place and, selecting on my List, I push the data off the grid

1-Visitor
August 18, 2016

You can use QueryImplementedThingWithData and filter your things that way, you can create a HelperThing for your project which would have lot of pre defined queries. You can use those to populate Query input parameter. Or even FilterWidget.

Filter widget would be great, but it does not support AND, it has only OR. That is why sometime is better to use pre defined queries.

You still should be able to change Thing's property even with GetImplemented...... if you choose Dynamic services based on template you can define dynamically which thing you want to update and it is matter how to activate proper services.


LIne charts are limited to Max 16 series, so 25 things wont go.

And it does not support switching series on/off--

New graph widgets can do those things, but they are limited to even less (8 I think) series and they have other issues as well.

I would recomend to use a repeater widget.