Introduction
Sometimes it is useful to visualize data in a line chart, where the line color varies based on the primary measure, or based an other measure. Below is one such example in Spotfire, where a scatter plot has been used to show the price of fertilizer over time, and the line color varies according to the price.
The regular line chart of Spotfire cannot achieve this, since it uses color to split the lines. However, as mentioned, the flexible scatter plot visualization can be used for this purpose instead. The trick is to use the line connection feature. Below follows a simple example where the data represents the price of fertilizer over time.
Instructions
Start by loading the data and then create a scatter plot like this:
Then open the Line Connection section of the scatter plot properties.
Here we need to tell Spotfire how to connect the markers with lines. In this case, we want only one single line, so we can set the value of the expression under "Draw a separate line per value in" to <1>.
Now, in the same section of the scatter plot properties, set the lines to be in the foreground and adjust the width of the lines to your liking.
Then, in the Size section of the scatter plot, make the markers a small as possible in order to give the visualization the appearance of a line chart.
Finally, lets go to the Color section of the scatter plot properties and select to Color by the column [Value].
You can adjust the Color logic to your liking, for example, like the settings defined below.
If you are interested in trying this out, here is a DXP file in the resources that contains this example.
Recommended Comments
There are no comments to display.