Series
Summary
The Series class contains properties for configuring series used in combo charts. Use this class in conjunction with the Combo class.
Syntax
Series(y, seriesType, {aggregation})
| Name | Explanation | Data type |
|---|---|---|
|
y |
The field name for the y-axis variable. If an empty string is specified and the |
String |
|
seriesType |
Specifies the series type.
|
String |
|
aggregation (Optional) |
Specifies the statistical calculation that will be applied to values aggregated into each bin.
|
String |
Properties
| Name | Explanation | Data type |
|---|---|---|
|
aggregation (Read and Write) |
Specifies the statistical calculation that will be applied to values aggregated into each bin.
|
String |
|
seriesType (Read and Write) |
Specifies the series type.
|
String |
|
y (Read and Write) |
The field name for the y-axis variable. If an empty string is specified and the |
String |
Code sample
Create a combo chart by configuring Series objects, and export the chart to an .svg file.
import arcpy
seriesLeft = [arcpy.charts.Series(y="", aggregation="count", seriesType="bar")]
seriesRight = [arcpy.charts.Series(y="prcp", aggregation="mean", seriesType="line")]
chart = arcpy.charts.Combo(x="day_for_trips", seriesLeft=seriesLeft, seriesRight=seriesRight,
title="Bike Trips and Precipitation",
yTitleLeft="Total Rides", yTitleRight="Average Precipitation",
dataSource="BikeTripData")
chart.exportToSVG("combo.svg", width=900, height=500)