
Building a details visualization using marking
The steps for building a details visualization using marking are slightly different for the Spotfire Analyst and web clients, so I'll point out how they differ along the way.
Reopen the KPI chart example file if you closed it earlier and follow these steps:
- Add a new line chart visualization:

Great—now, notice that it shows all the data for all the KPIs together—it's the summary of the entire dataset. That may not be what we want right now, but this is what we are about to configure!
- Using the Color by selector for the line chart (the selector is in the legend), choose Sector from the dropdown:

- Choose Avg(close]) for the y-axis for the line chart.
Wow—that looks different! Notice that choosing a column to color by has split the data into multiple lines. One for each sector:

If we had changed the Line by setting of the visualization, it would have also been divided into one line per sector, but the colors would not have been set - all the lines would have been gray. In effect, color has been used to segment (or slice/dice) the data into its separate categories. These categories now match what is shown in the KPI chart. We will see, a little later, how we can use line by and color by together to get an even deeper understanding of the data.
So far, the line chart shows all data. Let's update it to show just the data that corresponds to marked tiles in the KPI chart by configuring marking:
- The KPI chart is going to be the master visualization and the line chart for the details visualization. So, right-click on a KPI tile and choose KPI Settings (Analyst) or Properties (web).
- Navigate to the Data properties and check the Marking scheme that's being used. It should be the default and is just called Marking:

- Close the KPI chart properties, then right-click on the line chart and choose Properties, or click on the cog wheel in the top right-hand corner of the visualization.
- Navigate to Data properties and find Marking.
- In the Data limiting part of the dialog, select the checkbox to limit the data by Marking:

- In Analyst clients, I recommend that you also choose to show all data if no items are marked in the master visualization:

As we previously stated, this option is not available in the web client.
In the meantime, close the visualization properties and return to your dashboard. Try clicking on KPI tiles. Notice how the line chart updates to show the details of the data that belong to each tile that you mark.
Now, let's add another marking scheme (Analyst clients):
- Right-click on the line chart and choose Properties. Navigate to the Data page and locate Limit data using markings.
- Click the New... button.
- Choose a suitable color and name for the marking scheme and click OK:

- Now, choose the new marking scheme for the line chart:

We can add a new marking and configure the line chart to use it in web clients by following these steps:
- Choose Edit markings... from the Edit menu.
- Click the + icon to add a new marking scheme. You can rename it by clicking the pencil icon once it's been created (if you feel so inclined!):

- Return to the line chart properties and choose Marking (2) as the marking scheme for that visualization.
Finally, I suggest that you experiment a bit with marking some KPI tiles and observing what happens to the line chart. It should behave just like any other details visualization.