This article shows how to use the Graph Series Union and Data Labeler components to make a single chart showing multiple results. For example, the chart below shows the total number of American Goldfinches seen (in blue) compared to the total number of observations of that species (in red).
The first step to making a chart like this is to include the Graph Series Union component (highlighted below) in your pipe . This component can be used upstream of a chart to merge more than one data series so that they can be connected to the single data input port for a chart.
The pipe fragment shown below shows the "total number of observations" port in the AKN Histogram Calculator connected to the "series 1" input port in the Graph Series Union component. Similarly, the "total number of birds" port in the AKN Histogram Calculator is connected to the "series 2" input port of the Graph Series Union component. Finally, the "out" port of the Graph Series Union component is connected to the "dataPort" of the Line Chart component.
(Click image for larger view.)
However, the chart that this produces (shown below) isn't entirely satisfactory. The chart doesn't know the proper labels for those data series and it simply labels them "series 1" and "series 2". Read on to see how to fix that.
Use the Data Labeler component to label what each data series is. One Data Labeler is needed for each data series, so we modify our pipe to include two, highlighted below. Now the "total number of observations" port in the AKN Histogram Calculator is connected to the "data" input port in top Data Labeler and the "out" port of the same Data Labeler is connected to the "series 1" port of the Graph Series Union. Similarly, the "total number of birds" port in the AKN Histogram Calculator is connected to the "data" input port of the bottom Data Labeler and the "out" port of that Data Labeler is connected to the "series 2" port of the Graph Series Union. Finally, we type the labels we want for each series in the "Label:" settings for each Data Labeler. The top labeler gets the text "Number of Observations" and the bottom labeler gets the text "Total Number of Birds".
(Click image for larger view.)
The pipe now has each data series labeled and shown on the same chart, like the chart at the beginning of this article. For reference, the entire pipe used in this example is shown below.
(Click image for larger view.)


Comments
You can follow this conversation by subscribing to the comment feed for this post.