UNPKG

@arcgis/core

Version:

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

54 lines (52 loc) 2.16 kB
import type ChartMediaInfo from "./mixins/ChartMediaInfo.js"; import type { ChartMediaInfoProperties } from "./mixins/ChartMediaInfo.js"; export interface LineChartMediaInfoProperties extends ChartMediaInfoProperties {} /** * A `LineChartMediaInfo` is a type of chart media element * that represents a line chart displayed within a popup. * * ![popuptemplate-media-element-linechart](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/popuptemplate-media-element-linechart.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 LineChart to display within the PopupTemplate * // Create the ChartMediaInfoValue * let lineChartValue = new ChartMediaInfoValue({ * colors: [[220, 123, 4, 1]], * fields: ["<array of strings indicating fields>"], * normalizeField: null, * tooltipField: "<field name>" * }); * * // Create the LineChartMediaInfo media type * let lineChart = new LineChartMediaInfo({ * title: "<b>Count by type</b>", * caption: "Per block", * value: lineChartValue * }); * * // Create the MediaContent * let mediaElement = new MediaContent({ * mediaInfos: [lineChart] * }); */ export default class LineChartMediaInfo extends ChartMediaInfo { constructor(properties?: LineChartMediaInfoProperties); /** * Indicates the type of chart. * * @default "line-chart" */ get type(): "line-chart"; /** * Creates a deep clone of the LineChartMediaInfo class. * * @returns A deep clone of the LineChartMediaInfo instance. */ clone(): LineChartMediaInfo; }