UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

54 lines (52 loc) 2.22 kB
import type ChartMediaInfo from "./mixins/ChartMediaInfo.js"; import type { ChartMediaInfoProperties } from "./mixins/ChartMediaInfo.js"; export interface ColumnChartMediaInfoProperties extends ChartMediaInfoProperties {} /** * A `ColumnChartMediaInfo` is a type of chart media element * that represents a column chart displayed within a popup. * * ![popuptemplate-media-element-columnchart](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/popuptemplate-media-element-columnchart.png) * * @since 4.11 * @see [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) * @see [Content](https://developers.arcgis.com/javascript/latest/references/core/popup/content/Content/) * @see [ChartMediaInfoValue](https://developers.arcgis.com/javascript/latest/references/core/popup/content/support/ChartMediaInfoValue/) * @see [Sample - Intro to PopupTemplate](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/) * @see [Sample - Multiple popup elements](https://developers.arcgis.com/javascript/latest/sample-code/popup-multipleelements/) * @example * // Create a new ColumnChart to display within the PopupTemplate * // Create the ChartMediaInfoValue * let columnChartValue = new ChartMediaInfoValue({ * colors: [[220, 123, 4, 1], [229, 80, 53, 1], ...], * fields: ["<array of strings indicating fields>"], * normalizeField: null, * tooltipField: "<field name>" * }); * * // Create the ColumnChartMediaInfo media type * let columnChart = new ColumnChartMediaInfo({ * title: "<b>Count by type</b>", * caption: "Per block", * value: columnChartValue * }); * * // Create the MediaContent * let mediaElement = new MediaContent({ * mediaInfos: [columnChart] * }); */ export default class ColumnChartMediaInfo extends ChartMediaInfo { constructor(properties?: ColumnChartMediaInfoProperties); /** * Indicates the type of chart. * * @default "column-chart" */ get type(): "column-chart"; /** * Creates a deep clone of the ColumnChartMediaInfo class. * * @returns A deep clone of the ColumnChartMediaInfo instance. */ clone(): ColumnChartMediaInfo; }