Synthèse
The Series class contains properties for configuring series used in combo charts. Use this class in conjunction with the Combo class.
Syntaxe
Series (y, seriesType, {aggregation})
Paramètre | Explication | Type de données |
y | The field name for the y-axis variable. If an empty string is specified and the aggregation argument is set to COUNT, the series will reflect the aggregated row count for each x-axis location. | String |
seriesType | Specifies the series type.
| String |
aggregation | Specifies the statistical calculation that will be applied to values aggregated into each bin.
| String |
Propriétés
Propriété | Explication | Type de données |
aggregation (Lecture et écriture) | Specifies the statistical calculation that will be applied to values aggregated into each bin.
| String |
y (Lecture et écriture) | The field name for the y-axis variable. If an empty string is specified and the aggregation property is set to COUNT, the series will reflect the aggregated row count for each x-axis location. | String |
seriesType (Lecture et écriture) | Specifies the series type.
| String |
Exemple de code
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)
Vous avez un commentaire à formuler concernant cette rubrique ?