Examples


Really Simple

This example shows how to create simple LineChart using the smallest amount of code. Lets start by taking a look at the shortcode. As with all the examples, I’ve added a space after/before any square brackets to make sure that the shortcode is not processed. You need to remove this if you are copying this […]

Posted in Examples | 14 Comments

Labelling Axes

The Really Simple example showed how to create simple LineChart using a tiny amount of code. The graph showed some data but was missing horizontal and vertical axes. It was also missing a title. This example shows how to use the options attribute to make your graph look a bit more presentable. Lets recap. We’ve […]

Posted in Examples | 2 Comments

Multiple Series

The Really Simple example showed how to create simple LineChart and show one series. It’s possible to show multiple series on the same graph. In this example I’m going to show the air temperature and soil temperature for my basil plant that sits on my kitchen window sill. This example shows how to use the […]

Posted in Examples | 4 Comments

My Basil

This page is entirely devoted to my Basil plant.  The plant sits on my kitchen windowsill and is south facing. I love my Basil plant. I use it for Pizza and Tomato sauces. It has very green leaves and smells fantastic. It’s not growing very fast at the moment as it’s winter and we are […]

Posted in Examples | 1 Comment

Just get me the last value!

There are instances where a graph might not be appropriate. I might simply want to display the current temperature outside. I don’t want any fancy formatting I simply want to embed the value in one of my posts. Which value though? The temperature is only meaningful if you know the date and time at which […]

Posted in Examples | Leave a comment

Visualizing Mqtt JSON Payload 1

This post describes how to visualize Mqtt data when the Mqtt payload is JSON. I updated this post on 26th May 2019 for version 2.2. The example in this post will not work for versions prior to 2.2! How is MqttCogs data stored? Recall that data arriving from the Mqtt broker is persisted to a […]

Posted in Examples | Leave a comment

Making a Gauge Chart

This post explains how to create a Google Visualization Gauge chart. Extracting Data for a Google Visualization Gauge Google Visualization Gauges need a bit of thought. If you look at the documentation for the Gauge chart here, there is a sneaky little comment that reads: At the moment there’s no way to specify the title of […]

Posted in Examples | 2 Comments

Playing with GPS Data using Filter Hooks

I wrote a really basic example here that showed how to plot some GPS points onto map. The example works well but you may have noticed that it relies on the data in the Mqtt message payload formatted in a particular way. Remember what it looked like? If you’ve worked with GPS devices before you […]

Posted in Examples | Leave a comment

Visualize OwnTracks GPS Data

This post describes how to visualize Mqtt data from the OwnTracks App. For this experiment I installed OwnTracks onto my phone and filled in my credentials for my Mqtt broker. Problem 1: My Mqtt broker uses port 14027. Outgoing data to this port wasn’t allowed on the particular Wifi network I was using. This took […]

Posted in Examples | Leave a comment

A Time Triggered Action!

This example shows how to take an action based on a time or schedule. It uses the excellent WP Control plugin. This plugin allows you to easily set the time window or repeating schedule that you want to use. Here is my logic that I would like to implement. I’ve highlighted my criteria in green […]

Posted in Examples | Leave a comment