Geocortex Inline gives you complete flexibility when it comes to configuring conditional symbols in your charts.
Choose how you want to configure your chart symbology by selecting either the Style Rules editor or use the Arcade Scripts and build up more complex logic.
Watch us highlight how this works in this Geocortex Tech Tip, where we’ll show you a few different examples on how you can configure conditional symbols in your charts with Geocortex Inline.
“Hello! My name is Colin Doak. I’m a Technical Advisor with the Partners team here at VertiGIS and I’m going to show how to do conditional symbology in Geocortex Inline. Let’s get started!
There are a few options available in Geocortex Inline when you want to configure your chart symbology. Let’s take a look at those using the ILI Data band here. What I want to do is I want to configure the chart symbols for this scatter chart.
First let’s grab the band and then drill right into the chart. Already you can see that we can configure a bunch of options with this chart, but what we’re really interested in is the chart display options.
So, let’s say we want to configure the symbol shape and the symbol color for this particular chart. There are two options, really three options available. We can go ahead and just select a symbol color and change it. Similarly, we can select a simple shape, diamonds, cross, triangles, squares, etc. But if we want to have more complex symbology or symbol rules then we can use a couple of methods.
The first is to use Style Rules and style rules are a relatively new feature released in the Inline version 1.2, and allows you to add rules to be applied to the chart symbol set.
So, in this case what we want to do is we want to apply rules for the symbol type or the symbol shape by the anomaly type.
We select the ANOMALYTYPE and then we apply a conditional operator
It’s equal to and in this case, we know the different anomaly types.
It’s equal to internal corrosion right there. Then we want to set the symbol shape to be a circle. We can add another rule similarly, ANAMALYTYPE equal to this time we want to do ‘External Corrosion’.
So, you can see there it’s ‘External Corrosion’, simple shape is equal to let’s do a cross and etc. I can keep on building these out, so we can do diamonds, circles and other forms.
Also, you can have more complex logic, you can add parentheses around your operation and you could add multiple lines.
If we wanted to do ANOMOLYTYPE is equal to ‘External Corrosion’ and DEPTH is less than 10. Then we can set the symbol size to be you know five, etc.
Right, so we can build up very complex style rules using this conditional logic editor here.
The other options we have and we’re going to apply that to our symbol color is to use an arcade script and an arcade script can do all the same things that the style rule editor can do but you can do more around the manipulation of data.
For example, if you have to work with dates or if you have to perhaps do some string operations then you can use an arcade script rather than the style rule.
So, let’s have a look at that. Click on the Advanced tool to get the arcade editor here. Now, typically what I don’t do is I don’t edit the arcade script directly in Inline. What I do is I use Esri’s handy Arcade Editor right here, so that way I can test it out and make sure that the syntax is correct.
Now, the first thing you need to be aware of is that the data object in Inline is an object call called ‘d’. If you have to access any attribute that’s in the charts data set and this is typically analogous or the same as the attributes of a feature set.
For example, if I want to get the DEPTH, I can use a ‘d’ open brace depth, closed brace and what I do in order to test it is I create a dummy object in the arcade sandbox or playground here and this is not something that I use to or copy into the Inline editor because that would override the ‘d’ object every time or the data object every time that it was applied. This is simply for testing. So, what I did is I created a data object with a depth of 50. Let’s make that more reasonable 20 or 50 yeah 20. An anomaly type of ‘External Corrosion’.
You can see here, I have some relatively complex logic for applying my symbol colors. So, if the depth is greater than 15 and less than 30 and the here, we’re having we’re doing a string operation to find the get the corrosion, from nine characters from the right if it equals corrosion then apply this particular color. If it’s greater than 30 less than 40 and it’s a corrosion apply this color, otherwise if it’s still corrosion apply this and if it’s not corrosion like it’s a dent or a couch then apply this color.
That’s some relatively complex logic you can test it out, see that I’m getting a result no errors. If I change that to 50 and test it you see that the value is changing. So, that’s ready to go, but remember only grab the code that you want to apply to Inline, do not grab your dummy or ‘d’ data object.
Let’s grab that put it in the simple color and then we’re ready to go.
So, let’s have look at this in action. Here, we have Geocortex Inline in our energy demonstration site in Geocortex Web. I’ll select a range here and there we have it – there’s the ILI Data band with our chart. You can see we have circles and we have crosses; I’m not seeing any squares in this particular data set, but that’s not surprising and you can see that the symbol color is also being applied appropriately.
As you can see there are a few options available for when you’re configuring conditional symbols in your charts in Geocortex Inline you can use the style rules editor or you can use arcade scripts and build up more complex logic.”
Want to get a closer look of Geocortex Inline under the hood? Click the button below for product information, or to book a personal demonstration.