@arcgis/charts-components 5.1.0-next.5 → 5.1.0-next.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/AND6TXZC.js +2 -0
- package/dist/cdn/{NFGXU34G.js → KGYOF4HQ.js} +1 -1
- package/dist/cdn/ZD2OFLRT.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/bar-chart-model.js +1 -0
- package/dist/chunks/box-plot-model.js +5 -0
- package/dist/chunks/chart-ui-utils.js +4 -3
- package/dist/chunks/combo-bar-line-chart-model.js +3 -0
- package/dist/chunks/gauge-model.js +1 -0
- package/dist/chunks/heat-chart-model.js +1 -0
- package/dist/chunks/histogram-model.js +1 -0
- package/dist/chunks/line-chart-model.js +2 -0
- package/dist/chunks/model-setter.js +3 -0
- package/dist/chunks/pie-chart-model.js +1 -0
- package/dist/chunks/radar-chart-model.js +2 -0
- package/dist/chunks/scatterplot-model.js +1 -0
- package/dist/chunks/serial-chart-model.js +5 -0
- package/dist/components/arcgis-charts-config-create-flow/customElement.js +106 -106
- package/dist/components/arcgis-charts-config-format/customElement.js +20 -20
- package/dist/components/arcgis-charts-config-heat-chart-data/customElement.js +55 -55
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/model/bar-chart-model/bar-chart-model.d.ts +1 -10
- package/dist/model/box-plot-model/box-plot-model.d.ts +1 -34
- package/dist/model/chart-model/chart-model-base.d.ts +0 -46
- package/dist/model/combo-bar-line-chart-model/combo-bar-line-chart-model.d.ts +1 -14
- package/dist/model/gauge-model/gauge-model.d.ts +2 -11
- package/dist/model/heat-chart-model/heat-chart-model.d.ts +2 -10
- package/dist/model/histogram-model/histogram-model.d.ts +2 -11
- package/dist/model/line-chart-model/line-chart-model.d.ts +1 -14
- package/dist/model/mixins/model-with-line-marker-styling.d.ts +0 -4
- package/dist/model/mixins/model-with-multi-axes.d.ts +0 -3
- package/dist/model/pie-chart-model/pie-chart-model.d.ts +2 -17
- package/dist/model/radar-chart-model/radar-chart-model.d.ts +1 -14
- package/dist/model/scatterplot-model/scatterplot-model.d.ts +2 -11
- package/dist/model/serial-chart-model/serial-chart-model.d.ts +0 -42
- package/dist/utils/ui/chart-ui-utils.d.ts +3 -2
- package/package.json +3 -3
- package/dist/cdn/EXVJCW7V.js +0 -2
- package/dist/cdn/RUYVKHFW.js +0 -2
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { c as A } from "../../chunks/runtime.js";
|
|
3
3
|
import { createClassBreaksRenderer as E } from "@arcgis/core/smartMapping/renderers/color.js";
|
|
4
|
-
import { getSchemes as
|
|
5
|
-
import * as
|
|
6
|
-
import { LitElement as P, createEvent as w, renderElement as
|
|
7
|
-
import {
|
|
4
|
+
import { getSchemes as M } from "@arcgis/core/smartMapping/symbology/color.js";
|
|
5
|
+
import * as I from "@arcgis/core/smartMapping/symbology/support/colorRamps.js";
|
|
6
|
+
import { LitElement as P, createEvent as w, renderElement as O, safeClassMap as n, safeStyleMap as $ } from "@arcgis/lumina";
|
|
7
|
+
import { getElementLocale as _, normalizeLocale as H, defaultLocale as L } from "@arcgis/toolkit/intl";
|
|
8
|
+
import { css as N, html as r } from "lit";
|
|
8
9
|
import { createRef as p, ref as g } from "lit/directives/ref.js";
|
|
9
|
-
import { isEqual as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
10
|
+
import { isEqual as B, cloneDeep as U, parseInt as W, camelCase as V } from "lodash-es";
|
|
11
|
+
import { DateTime as K } from "luxon";
|
|
12
|
+
import { bK as j, Z as q, br as z, dm as X, ax as k, cY as x, d7 as Y, dj as Z, ay as C } from "../../chunks/index.js";
|
|
13
|
+
import { u as R } from "../../chunks/useT9n.js";
|
|
14
|
+
import { d as i, W as v } from "../../chunks/interfaces.js";
|
|
15
|
+
import { H as G } from "../../chunks/common.js";
|
|
14
16
|
import "@arcgis/toolkit/type";
|
|
15
|
-
import { j as u, W as h, a as y, v as b, l as
|
|
16
|
-
import { f as
|
|
17
|
-
import { x as
|
|
18
|
-
import { i as
|
|
19
|
-
import { getElementLocale as Q, normalizeLocale as ee, defaultLocale as ae } from "@arcgis/toolkit/intl";
|
|
20
|
-
import { DateTime as te } from "luxon";
|
|
17
|
+
import { j as u, W as h, a as y, v as b, l as T, u as J, m as f } from "../../chunks/series-types.js";
|
|
18
|
+
import { f as Q, j as ee } from "../../chunks/rest-js-object-literals.js";
|
|
19
|
+
import { x as ae } from "../../chunks/data.js";
|
|
20
|
+
import { i as te } from "../../chunks/utils.js";
|
|
21
21
|
import "d3-array";
|
|
22
22
|
import "@arcgis/core/intl.js";
|
|
23
23
|
import "@arcgis/core/layers/support/FeatureFilter.js";
|
|
@@ -34,9 +34,9 @@ import "@arcgis/core/core/promiseUtils.js";
|
|
|
34
34
|
import { b as se } from "../../chunks/index3.js";
|
|
35
35
|
import "@arcgis/toolkit/dom";
|
|
36
36
|
import { r as le } from "../../chunks/popover-ui-utils.js";
|
|
37
|
-
import { j as
|
|
37
|
+
import { j as F, s as ie } from "../../chunks/chart-ui-utils2.js";
|
|
38
38
|
import { g as oe, e as re, p as S, c as ne, i as ce } from "../../chunks/class-breaks.js";
|
|
39
|
-
const he =
|
|
39
|
+
const he = N`.hide{display:none}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}:host{display:flex;flex-direction:column;width:var(--arcgis-charts-config-calcite-block-default-width);margin:var(--arcgis-charts-config-calcite-block-default-margin);margin-top:var(--arcgis-charts-top-section-margin)}.label{display:flex;margin-left:var(--arcgis-charts-config-margin-minor);margin-right:var(--arcgis-charts-config-margin-minor);margin-bottom:var(--arcgis-charts-config-margin-minor);justify-content:space-between}.color-ramp{width:100%;height:20px;overflow:hidden;border-radius:0}.color-ramp-segment{height:100%;display:inline-block}.list{margin-left:var(--arcgis-charts-config-margin-minor);margin-right:var(--arcgis-charts-config-margin-minor);margin-bottom:var(--arcgis-charts-config-margin-major)}.accordion{margin-top:var(--arcgis-charts-config-margin-minor);margin-bottom:var(--arcgis-charts-config-margin-major)}`, c = {
|
|
40
40
|
label: "label",
|
|
41
41
|
colorRamp: "color-ramp",
|
|
42
42
|
colorRampSegment: "color-ramp-segment",
|
|
@@ -45,7 +45,7 @@ const he = O`.hide{display:none}.am5-html-container{z-index:101!important}.am5-l
|
|
|
45
45
|
};
|
|
46
46
|
class me extends P {
|
|
47
47
|
constructor() {
|
|
48
|
-
super(...arguments), this._messages =
|
|
48
|
+
super(...arguments), this._messages = R(), this.commonStrings = R({ name: "common", blocking: !0 }), this.heatChartPopover = null, this.xAxisFieldElement = p(), this.aggregationElement = p(), this.numericFieldsElement = p(), this.calendarTypeElement = p(), this.calendarViewTypeElement = p(), this.classBreakMethodElement = p(), this.nullElement = p(), this.breaksCountElement = p(), this.colorSchemeElement = p(), this.onHeatChartDataPopoverChange = async (e) => {
|
|
49
49
|
try {
|
|
50
50
|
if (e.detail?.value !== void 0) {
|
|
51
51
|
const { contentKind: a } = e.detail, t = e.detail.value;
|
|
@@ -57,11 +57,11 @@ class me extends P {
|
|
|
57
57
|
this.model.xAxisField = t, this.setDefaultPropertiesForCalendarHeatChart();
|
|
58
58
|
break;
|
|
59
59
|
case i.numericFields:
|
|
60
|
-
this.model.numericFields = [t.trim() || ""], (this.model.numericFields ?? []).length > 0 && this.model.aggregationType === y.Count && this.model.numericFields[0] !==
|
|
60
|
+
this.model.numericFields = [t.trim() || ""], (this.model.numericFields ?? []).length > 0 && this.model.aggregationType === y.Count && this.model.numericFields[0] !== j(this.model.layer).idField && (this.model.aggregationType = y.Sum);
|
|
61
61
|
break;
|
|
62
62
|
case i.calendarType: {
|
|
63
63
|
switch (t) {
|
|
64
|
-
case
|
|
64
|
+
case v.YearByMonthAndDayOfMonth: {
|
|
65
65
|
const s = {
|
|
66
66
|
type: h.CalendarDateParts,
|
|
67
67
|
unit: u.DayOfMonth
|
|
@@ -78,14 +78,14 @@ class me extends P {
|
|
|
78
78
|
});
|
|
79
79
|
break;
|
|
80
80
|
}
|
|
81
|
-
case
|
|
81
|
+
case v.WeekByDayOfWeekAndHourOfDay: {
|
|
82
82
|
const s = {
|
|
83
83
|
type: h.CalendarDateParts,
|
|
84
84
|
unit: u.HourOfDay
|
|
85
85
|
}, l = {
|
|
86
86
|
type: h.CalendarDateParts,
|
|
87
87
|
unit: u.DayOfWeek
|
|
88
|
-
}, { lang: o } =
|
|
88
|
+
}, { lang: o } = _(this.el ?? document.documentElement), m = H(o), d = K.local().setLocale(o).startOf("week", { useLocaleWeeks: m !== L }).weekday;
|
|
89
89
|
this.model.firstDayOfWeek = d, this.model.xTemporalBinning = s, this.model.setAxisValueFormat(0, {
|
|
90
90
|
type: h.DateAxisFormat,
|
|
91
91
|
intlOptions: { hour: "numeric", hour12: !0 }
|
|
@@ -119,10 +119,10 @@ class me extends P {
|
|
|
119
119
|
}, this.popoverClose = (e) => {
|
|
120
120
|
this.heatChartPopover === e?.target && this.removeHeatChartDataPopover();
|
|
121
121
|
}, this.onModelConfigChange = () => {
|
|
122
|
-
|
|
122
|
+
q(this.model?.config) && (this.selectedColorRamp = this.availableColorRamps.find((e) => e.name === "Blue 3") ?? this.availableColorRamps[0]), this.requestUpdate();
|
|
123
123
|
}, this.allColorRamps = [], this.onColorRampSelection = (e) => {
|
|
124
124
|
const { ramp: a, isFlipped: t } = e.detail;
|
|
125
|
-
this.isFlipped = t,
|
|
125
|
+
this.isFlipped = t, B(this.selectedColorRamp, a) || (this.selectedColorRamp = a, this.updateChartRenderer = !0, this.updateClassBreaksColor = !0, this.generateAndUpdateClassBreaks());
|
|
126
126
|
}, this.updateClassBreaksColor = !1, this.onEmptyCellNameChange = (e) => {
|
|
127
127
|
const { name: a } = e.detail;
|
|
128
128
|
if (a !== void 0) {
|
|
@@ -139,7 +139,7 @@ class me extends P {
|
|
|
139
139
|
...t,
|
|
140
140
|
symbol: {
|
|
141
141
|
...t?.symbol,
|
|
142
|
-
type:
|
|
142
|
+
type: Q.SFS,
|
|
143
143
|
color: a,
|
|
144
144
|
outline: t?.symbol?.outline && { ...t.symbol.outline, color: a }
|
|
145
145
|
}
|
|
@@ -161,7 +161,7 @@ class me extends P {
|
|
|
161
161
|
this.modelChange(this.model), this.onModelConfigChange();
|
|
162
162
|
}
|
|
163
163
|
willUpdate(e) {
|
|
164
|
-
e.has("model") && this.modelChange(this.model, e.get("model")), this.aggregationLabel =
|
|
164
|
+
e.has("model") && this.modelChange(this.model, e.get("model")), this.aggregationLabel = z(this.model.aggregationType, this.commonStrings), e.has("chartData") && (this.updateChartRenderer = this.model.chartRenderer === void 0 || X(this.model.chartRenderer) === ee.ClassBreaks);
|
|
165
165
|
}
|
|
166
166
|
updated(e) {
|
|
167
167
|
e.has("updateChartRenderer") && this.updateChartRenderer && this.generateAndUpdateClassBreaks();
|
|
@@ -170,7 +170,7 @@ class me extends P {
|
|
|
170
170
|
super.disconnectedCallback(), this.model.removeEventListener("arcgisChartsModelConfigChange", this.onModelConfigChange);
|
|
171
171
|
}
|
|
172
172
|
loadColorRampFromArcGIS() {
|
|
173
|
-
const e =
|
|
173
|
+
const e = I.all();
|
|
174
174
|
this.allColorRamps = e, this.availableColorRamps = this.allColorRamps;
|
|
175
175
|
}
|
|
176
176
|
generateColorsForExistingBreaks(e) {
|
|
@@ -193,7 +193,7 @@ class me extends P {
|
|
|
193
193
|
async generateAndUpdateClassBreaks() {
|
|
194
194
|
let e = [];
|
|
195
195
|
if (this.model.classificationMethod === b.manual && this.model.chartRenderer?.classBreakInfos.length > 0 && this.selectedColorRamp) {
|
|
196
|
-
e =
|
|
196
|
+
e = U(this.model.chartRenderer?.classBreakInfos) ?? [];
|
|
197
197
|
const s = this.generateColorsForExistingBreaks(this.selectedColorRamp);
|
|
198
198
|
for (let l = 0; l < e.length && l < s.length; l++)
|
|
199
199
|
e[l].symbol && (e[l].symbol.color = s[l]);
|
|
@@ -202,10 +202,10 @@ class me extends P {
|
|
|
202
202
|
categoryField: this.model?.xAxisField?.[0] ?? "",
|
|
203
203
|
categoryType: h.DateAxisFormat,
|
|
204
204
|
numericFields: [k.valueField],
|
|
205
|
-
inlineData: this.chartData
|
|
205
|
+
inlineData: this.chartData ?? this.model.dataStore.chartData
|
|
206
206
|
});
|
|
207
207
|
if (s.layer && this.model.layer) {
|
|
208
|
-
const o =
|
|
208
|
+
const o = M({
|
|
209
209
|
geometryType: "point",
|
|
210
210
|
theme: "high-to-low"
|
|
211
211
|
})?.primaryScheme, m = await E({
|
|
@@ -225,7 +225,7 @@ class me extends P {
|
|
|
225
225
|
});
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
const a = !this.updateClassBreaksColor, t = !
|
|
228
|
+
const a = !this.updateClassBreaksColor, t = !B(this.normalizeClassBreakInfosForCompare(this.model.chartRenderer?.classBreakInfos, a), this.normalizeClassBreakInfosForCompare(e, a));
|
|
229
229
|
this.updateChartRenderer && t && (this.model.chartRenderer = {
|
|
230
230
|
type: "classBreaks",
|
|
231
231
|
// TODO (heat-chart) use the correct type
|
|
@@ -237,10 +237,10 @@ class me extends P {
|
|
|
237
237
|
a?.removeEventListener("arcgisChartsModelConfigChange", this.onModelConfigChange), e?.addEventListener("arcgisChartsModelConfigChange", this.onModelConfigChange);
|
|
238
238
|
}
|
|
239
239
|
getCorrectedXAxisFieldValue() {
|
|
240
|
-
return
|
|
240
|
+
return ae({
|
|
241
241
|
fieldName: this.model.xAxisField,
|
|
242
242
|
fieldList: this.layerFieldsInfo
|
|
243
|
-
}) ? "" :
|
|
243
|
+
}) ? "" : x(this.layerFieldsInfo, this.model.xAxisField);
|
|
244
244
|
}
|
|
245
245
|
onXAxisFieldSelect(e) {
|
|
246
246
|
this.contentKind = i.xAxisField, this.setupPopover(e);
|
|
@@ -258,8 +258,8 @@ class me extends P {
|
|
|
258
258
|
this.contentKind = i.colorScheme, this.setupPopover(e);
|
|
259
259
|
}
|
|
260
260
|
onBreaksCountChange(e) {
|
|
261
|
-
let a =
|
|
262
|
-
a < C.min ? a = C.min : a > C.max && (a = C.max),
|
|
261
|
+
let a = W(e.target.value);
|
|
262
|
+
a < C.min ? a = C.min : a > C.max && (a = C.max), Y(a) && (this.breaksCountElement.value && (this.breaksCountElement.value.value = a.toString()), this.model.breaksCount = a, this.updateChartRenderer = !0);
|
|
263
263
|
}
|
|
264
264
|
onAggregationSelect(e) {
|
|
265
265
|
this.contentKind = i.aggregation, this.setupPopover(e);
|
|
@@ -288,7 +288,7 @@ class me extends P {
|
|
|
288
288
|
a = this.numericFieldsElement.value, t = this._messages.numericField, s = this.model.numericFields?.[0];
|
|
289
289
|
break;
|
|
290
290
|
case i.calendarType:
|
|
291
|
-
a = this.calendarTypeElement.value, t = this._messages.calendarType, s =
|
|
291
|
+
a = this.calendarTypeElement.value, t = this._messages.calendarType, s = F(this.model);
|
|
292
292
|
break;
|
|
293
293
|
case i.calendarViewType:
|
|
294
294
|
a = this.calendarViewTypeElement.value, t = this._messages.viewType, s = this.model.viewType;
|
|
@@ -307,14 +307,14 @@ class me extends P {
|
|
|
307
307
|
a = e.target, t = this._messages.null;
|
|
308
308
|
break;
|
|
309
309
|
}
|
|
310
|
-
this.heatChartPopover =
|
|
310
|
+
this.heatChartPopover = O(r`<arcgis-charts-config-heat-chart-popover .headingTitle=${t} .referenceElement=${a} open .contentKind=${this.contentKind} .model=${this.model} .layerFieldsInfo=${this.layerFieldsInfo} .selectedContent=${s} @arcgisChartsConfigHeatChartDataPopoverChange=${this.onHeatChartDataPopoverChange} @arcgisChartsConfigPopoverClose=${this.popoverClose} .colorRamps=${this.availableColorRamps} @arcgisChartsConfigHeatChartColorRampChange=${this.onColorRampSelection} @arcgisChartsConfigPopoverEmptyCellColorChange=${this.onEmptyCellColorChange} @arcgisChartsConfigPopoverEmptyCellNameChange=${this.onEmptyCellNameChange} .isFlipped=${l}></arcgis-charts-config-heat-chart-popover>`), !document.body.contains(this.heatChartPopover) && this.heatChartPopover !== null && document.body.appendChild(this.heatChartPopover);
|
|
311
311
|
}
|
|
312
312
|
removeHeatChartDataPopover() {
|
|
313
313
|
this.heatChartPopover !== null && (this.heatChartPopover.open = !1, this.heatChartPopover = le(this.heatChartPopover));
|
|
314
314
|
}
|
|
315
315
|
setDefaultPropertiesForCalendarHeatChart() {
|
|
316
|
-
if (!
|
|
317
|
-
if (this.model.yAxisField = this.model.xAxisField, this.model.setYAxisSortOrder(
|
|
316
|
+
if (!te(this.model?.config)) {
|
|
317
|
+
if (this.model.yAxisField = this.model.xAxisField, this.model.setYAxisSortOrder(G.Desc), this.model.xTemporalBinning === void 0) {
|
|
318
318
|
const e = {
|
|
319
319
|
type: h.CalendarDateParts,
|
|
320
320
|
unit: u.DayOfMonth
|
|
@@ -328,26 +328,26 @@ class me extends P {
|
|
|
328
328
|
};
|
|
329
329
|
this.model.yTemporalBinning = e, this.model.setAxisValueFormat(1, { type: h.DateAxisFormat, intlOptions: { month: "short" } });
|
|
330
330
|
}
|
|
331
|
-
this.model.classificationMethod === void 0 && (this.model.classificationMethod = b.naturalBreaks), this.model.heatRulesType !==
|
|
331
|
+
this.model.classificationMethod === void 0 && (this.model.classificationMethod = b.naturalBreaks), this.model.heatRulesType !== T.Renderer && (this.model.heatRulesType = T.Renderer), this.model.viewType === void 0 && (this.model.viewType = J.singleCalendarView), (this.model.aggregationType === y.Count || this.model.aggregationType === y.Sum) && this.model.nullPolicy !== f.Zero && (this.model.nullPolicy = f.Zero);
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
renderXAxisFieldSelect() {
|
|
335
335
|
const e = this.getCorrectedXAxisFieldValue();
|
|
336
|
-
return
|
|
336
|
+
return r`<arcgis-charts-config-field-select .label=${e} @click=${this.onXAxisFieldSelect} ${g(this.xAxisFieldElement)}></arcgis-charts-config-field-select>`;
|
|
337
337
|
}
|
|
338
338
|
renderAggregation() {
|
|
339
|
-
return
|
|
339
|
+
return r`<arcgis-charts-config-field-select .label=${this.model.aggregationType === y.NoAggregation ? this._messages.noAggregation : this.aggregationLabel} @click=${this.onAggregationSelect} ${g(this.aggregationElement)}></arcgis-charts-config-field-select>`;
|
|
340
340
|
}
|
|
341
341
|
renderNumericFieldsSelect() {
|
|
342
|
-
const e = this.model.numericFields?.[0] === this.model.layer?.objectIdField ? "" :
|
|
343
|
-
return
|
|
342
|
+
const e = this.model.numericFields?.[0] === this.model.layer?.objectIdField ? "" : x(this.layerFieldsInfo, this.model.numericFields?.[0]);
|
|
343
|
+
return r`<arcgis-charts-config-field-select .label=${e} @click=${this.onNumericFieldSelect} ${g(this.numericFieldsElement)}></arcgis-charts-config-field-select>`;
|
|
344
344
|
}
|
|
345
345
|
renderCalendarTypeSelect() {
|
|
346
|
-
const e =
|
|
346
|
+
const e = F(this.model) ?? "", a = {
|
|
347
347
|
weekByDayOfWeekAndHourOfDay: this._messages.weekByDayOfWeekAndHourOfDay,
|
|
348
348
|
yearByMonthAndDayOfMonth: this._messages.yearByMonthAndDayOfMonth
|
|
349
349
|
}, t = e ? a[e] ?? "" : "";
|
|
350
|
-
return
|
|
350
|
+
return r`<arcgis-charts-config-field-select .label=${t} @click=${this.onCalendarTypeSelect} ${g(this.calendarTypeElement)}></arcgis-charts-config-field-select>`;
|
|
351
351
|
}
|
|
352
352
|
renderClassBreakMethodSelect() {
|
|
353
353
|
const e = {
|
|
@@ -355,30 +355,30 @@ class me extends P {
|
|
|
355
355
|
manual: this._messages.classBreaksMethod?.manual,
|
|
356
356
|
naturalBreaks: this._messages.classBreaksMethod?.naturalBreaks,
|
|
357
357
|
quantile: this._messages.classBreaksMethod?.quantile
|
|
358
|
-
}, a = this.model.classificationMethod ? e[
|
|
359
|
-
return
|
|
358
|
+
}, a = this.model.classificationMethod ? e[V(this.model.classificationMethod)] ?? "" : "";
|
|
359
|
+
return r`<arcgis-charts-config-field-select .label=${a} @click=${this.onClassBreakMethodSelect} ${g(this.classBreakMethodElement)}></arcgis-charts-config-field-select>`;
|
|
360
360
|
}
|
|
361
361
|
renderColorRampSelect() {
|
|
362
362
|
const e = this.model.chartRenderer?.classBreakInfos?.map((a) => {
|
|
363
363
|
const t = a !== void 0 ? ne(a.symbol.color) : "#FFFFFF";
|
|
364
|
-
return
|
|
364
|
+
return r`<div class=${n(c.colorRampSegment)} style=${$({ backgroundColor: t, width: `${100 / this.model.breaksCount}%` })}></div>`;
|
|
365
365
|
});
|
|
366
|
-
return
|
|
366
|
+
return r`<arcgis-charts-config-field-select label @click=${this.onColorSchemeSelect} ${g(this.colorSchemeElement)}><div slot=fieldSelectSlot class=${n(c.colorRamp)}>${e}</div></arcgis-charts-config-field-select>`;
|
|
367
367
|
}
|
|
368
368
|
renderClassBreaksTable() {
|
|
369
369
|
const e = this.model.chartRenderer?.classBreakInfos ?? [];
|
|
370
|
-
return
|
|
370
|
+
return r`<calcite-table caption="Simple table"><calcite-table-row slot=table-header><calcite-table-header .heading=${this._messages.symbol}></calcite-table-header><calcite-table-header .heading=${this._messages.upperValue}></calcite-table-header></calcite-table-row>${e.map((a) => r`<calcite-table-row><calcite-table-cell><calcite-swatch label scale=m .color=${`rgba(${a.symbol.color?.[0]}, ${a.symbol.color?.[1]}, ${a.symbol.color?.[2]}, ${a.symbol.color?.[3] / 255})`}></calcite-swatch></calcite-table-cell><calcite-table-cell>${a.label}</calcite-table-cell></calcite-table-row>`)}</calcite-table>`;
|
|
371
371
|
}
|
|
372
372
|
renderNullUI() {
|
|
373
|
-
const e = this.model.emptyCell, a = this._messages.null, t = e?.symbol?.color ??
|
|
374
|
-
return
|
|
373
|
+
const e = this.model.emptyCell, a = this._messages.null, t = e?.symbol?.color ?? Z.grayColor, [s, l, o, m] = [...t], d = `rgba(${s},${l},${o},${m / 255})`;
|
|
374
|
+
return r`<calcite-list label class=${n(c.list)} selection-mode=none ${g(this.nullElement)}><calcite-list-item .label=${a} .value=${a} @calciteListItemSelect=${this.onNullSelect}><calcite-icon icon=square-f style=${$({ color: d })} slot=content-end></calcite-icon></calcite-list-item></calcite-list>`;
|
|
375
375
|
}
|
|
376
376
|
renderEmptyBins() {
|
|
377
|
-
return
|
|
377
|
+
return r`<calcite-radio-button-group name=empty-bins layout=vertical @calciteRadioButtonGroupChange=${this.onNullPolicyChange}><calcite-label layout=inline><calcite-radio-button .value=${f.Zero} .checked=${this.model.nullPolicy === f.Zero}></calcite-radio-button>${this._messages.treatAsZero}</calcite-label><calcite-label layout=inline><calcite-radio-button .value=${f.Null} .checked=${this.model.nullPolicy === f.Null}></calcite-radio-button>${this._messages.treatAsNull}</calcite-label></calcite-radio-button-group>`;
|
|
378
378
|
}
|
|
379
379
|
render() {
|
|
380
380
|
const e = this.renderXAxisFieldSelect(), a = this.renderAggregation(), t = this.renderNumericFieldsSelect(), s = this.renderCalendarTypeSelect(), l = this.renderClassBreakMethodSelect(), o = this.renderColorRampSelect(), m = this.renderClassBreaksTable(), d = this.renderNullUI(), D = this.renderEmptyBins();
|
|
381
|
-
return
|
|
381
|
+
return r`<calcite-label class=${n(c.label)}>${this._messages.dateRequired}${e}</calcite-label><calcite-label class=${n(c.label)}>${this._messages.calendarType}${s}</calcite-label><calcite-label class=${n(c.label)}>${this._messages.aggregation}${a}</calcite-label><calcite-label class=${n(c.label)}>${this._messages.numericField}${t}</calcite-label><calcite-label class=${n(c.label)}>${this._messages.method}${l}</calcite-label><calcite-label class=${n(c.label)}>${this._messages.numberOfClasses}<calcite-input type=number .min=${C.min} .max=${C.max} .disabled=${this.model.classificationMethod === void 0 || this.model.classificationMethod === b.manual} step=1 .value=${ie(this.model.breaksCount, 5)} @calciteInputInput=${this.onBreaksCountChange} ${g(this.breaksCountElement)}></calcite-input></calcite-label><calcite-label class=${n(c.label)}>${this._messages.colorScheme}${o}</calcite-label>${d}<calcite-accordion class=${n(c.accordion)} appearance=transparent selection-mode=single><calcite-accordion-item .heading=${this._messages.classBreaks}>${m}</calcite-accordion-item></calcite-accordion><calcite-label class=${n(c.label)}>${this._messages.emptyBins}${D}</calcite-label>${F(this.model) === v.YearByMonthAndDayOfMonth ? r`<calcite-label class=${n(c.label)} layout=inline-space-between>${this._messages.includeLeapDay}<calcite-switch .checked=${this.model.includeLeapDay} @calciteSwitchChange=${this.onIncludeLeapDayChange}></calcite-switch></calcite-label>` : null}`;
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
384
|
A("arcgis-charts-config-heat-chart-data", me);
|