TimeBinningProperties

サマリー

The TimeBinningProperties class contains properties for configuring time binning used for temporal charts.

構文

TimeBinningProperties (intervalSize, intervalUnits, timeAggregationType, trimIncompleteInterval, referenceTime)
パラメーター説明データ タイプ
intervalSize

The span of time that is binned or aggregated together. This value must be used in conjunction with the intervalUnits value.

Integer
intervalUnits

Specifies the time unit that corresponds to the intervalSize value.

  • SECONDSThe time unit is seconds.
  • MINUTESThe time unit is minutes.
  • HOURSThe time unit is hours.
  • DAYSThe time unit is days.
  • WEEKSThe time unit is weeks.
  • MONTHSThe time unit is months.
  • YEARSThe time unit is years.
String
timeAggregationType

Specifies the time interval alignment type.

  • equalIntervalsFromStartTimeThe time interval is aligned with the start date.
  • equalIntervalsFromEndTimeThe time interval is aligned with the end date.
  • referenceTimeThe time interval is aligned to a reference time. Used in conjunction with the referenceTime property.
String
trimIncompleteInterval

Specifies whether incomplete time intervals at the start or end of the data span (depending on the timeAggregationType value) are removed (trimmed) from the chart. Incomplete intervals on a chart can cause misleading results in which the period in question is underreported or overreported due to a different amount of time in the interval.

  • TrueIncomplete intervals are removed.
  • FalseIncomplete intervals are not removed.
Boolean
referenceTime

Specifies the time that binning is initiated.

DateTime

プロパティ

プロパティ説明データ タイプ
intervalSize
(読み書き)

The span of time that is binned or aggregated together. This property must be used in conjunction with the intervalUnits property.

Integer
intervalUnits
(読み書き)

Specifies the time unit that corresponds to the intervalSize property value.

  • SECONDSThe time unit is seconds.
  • MINUTESThe time unit is minutes.
  • HOURSThe time unit is hours.
  • DAYSThe time unit is days.
  • WEEKSThe time unit is weeks.
  • MONTHSThe time unit is months.
  • YEARSThe time unit is years.
String
referenceTime
(読み書き)

Specifies the time that binning is initiated.

DateTime
timeAggregationType
(読み書き)

Specifies the time interval alignment type.

  • equalIntervalsFromStartTimeThe time interval is aligned with the start date.
  • equalIntervalsFromEndTimeThe time interval is aligned with the end date.
  • referenceTimeThe time interval is aligned to a reference time. Used in conjunction with the referenceTime property.
String
trimIncompleteInterval
(読み書き)

Specifies whether incomplete time intervals at the start or end of the data span (depending on the timeAggregationType value) are removed (trimmed) from the chart. Incomplete intervals on a chart can cause misleading results in which the period in question is underreported or overreported due to a different amount of time in the interval.

  • TrueIncomplete intervals are removed.
  • FalseIncomplete intervals are not removed.
Boolean

コードのサンプル

TimeBinningProperties example

Use TimeBinningProperties to create a temporal bar chart.

import arcpy

url = r"https://services1.arcgis.com/hLJbHVT9ZrDIzK0I/arcgis/rest/services/CrimesChiTheft/FeatureServer/0"
bins = arcpy.charts.TimeBinningProperties(intervalSize=1, intervalUnits='MONTHS')
bar = arcpy.charts.Bar(x="datetime", aggregation="count", title="Incidents by Month", 
                       timeBinningProperties=bins, dataSource=url)
bar.exportToSVG('temporal_bar.svg', width=800, height=600)