@xplortech/apollo-data 0.0.5 → 0.0.6

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.
Files changed (80) hide show
  1. package/README.md +15 -91
  2. package/dist/apollo-data/apollo-data.esm.js +1 -1
  3. package/dist/apollo-data/p-25841a73.entry.js +1 -0
  4. package/dist/apollo-data/p-839050b7.entry.js +1 -0
  5. package/dist/apollo-data/p-C2k3WBpi.js +11 -0
  6. package/dist/apollo-data/p-D64asVrg.js +2 -0
  7. package/dist/apollo-data/{p-b7471c12.entry.js → p-e2c3a317.entry.js} +1 -1
  8. package/dist/cjs/apollo-data-bar-chart.cjs.entry.js +10 -9
  9. package/dist/cjs/{apollo-data-base-CxVQ-WVP.js → apollo-data-base-COGMOEqL.js} +7 -11
  10. package/dist/cjs/apollo-data-donut-chart.cjs.entry.js +3 -3
  11. package/dist/cjs/{apollo-data-line-chart_2.cjs.entry.js → apollo-data-heat-map_4.cjs.entry.js} +358 -9
  12. package/dist/cjs/apollo-data.cjs.js +3 -3
  13. package/dist/cjs/{index-Cl7HgRm0.js → index-Bd5risOy.js} +116 -63
  14. package/dist/cjs/loader.cjs.js +2 -2
  15. package/dist/collection/apollo-data-base.js +4 -8
  16. package/dist/collection/collection-manifest.json +5 -2
  17. package/dist/collection/components/apollo-data-bar/apollo-data-bar.js +8 -7
  18. package/dist/collection/components/apollo-data-bar/apollo-data-bar.stories.js +122 -0
  19. package/dist/collection/components/apollo-data-donut/apollo-data-donut.js +1 -1
  20. package/dist/collection/components/apollo-data-donut/apollo-data-donut.stories.js +132 -0
  21. package/dist/collection/components/apollo-data-heat-map/apollo-data-heat-map.js +208 -0
  22. package/dist/collection/components/apollo-data-heat-map/apollo-data-heat-map.stories.js +137 -0
  23. package/dist/collection/components/apollo-data-line/apollo-data-line.js +8 -6
  24. package/dist/collection/components/apollo-data-line/apollo-data-line.stories.js +122 -0
  25. package/dist/collection/components/apollo-data-scatter/apollo-data-scatter.js +1 -1
  26. package/dist/collection/components/apollo-data-scatter/apollo-data-scatter.stories.js +147 -0
  27. package/dist/collection/components/apollo-data-world-map/apollo-data-world-map.js +294 -0
  28. package/dist/collection/components/apollo-data-world-map/apollo-data-world-map.stories.js +126 -0
  29. package/dist/collection/examples/apollo-data-heat-map.examples.js +131 -0
  30. package/dist/collection/examples/apollo-data-world-map.examples.js +45 -0
  31. package/dist/collection/examples/index.js +2 -0
  32. package/dist/collection/utils/code-generator.js +1 -1
  33. package/dist/components/apollo-data-bar-chart.js +1 -1
  34. package/dist/components/apollo-data-donut-chart.js +1 -1
  35. package/dist/components/apollo-data-heat-map.d.ts +11 -0
  36. package/dist/components/apollo-data-heat-map.js +1 -0
  37. package/dist/components/apollo-data-line-chart.js +1 -1
  38. package/dist/components/apollo-data-scatter-chart.js +1 -1
  39. package/dist/components/apollo-data-world-map-chart.d.ts +11 -0
  40. package/dist/components/apollo-data-world-map-chart.js +1 -0
  41. package/dist/components/index.js +1 -1
  42. package/dist/components/p-CfbMSXKd.js +11 -0
  43. package/dist/components/p-gcjU8DVr.js +1 -0
  44. package/dist/esm/apollo-data-bar-chart.entry.js +10 -9
  45. package/dist/esm/{apollo-data-base-BWkrM8dc.js → apollo-data-base-C2k3WBpi.js} +7 -11
  46. package/dist/esm/apollo-data-donut-chart.entry.js +3 -3
  47. package/dist/esm/{apollo-data-line-chart_2.entry.js → apollo-data-heat-map_4.entry.js} +357 -10
  48. package/dist/esm/apollo-data.js +4 -4
  49. package/dist/esm/{index-Bb2nY-Tf.js → index-D64asVrg.js} +116 -63
  50. package/dist/esm/loader.js +3 -3
  51. package/dist/types/apollo-data-base.d.ts +2 -2
  52. package/dist/types/components/apollo-data-bar/apollo-data-bar.stories.d.ts +5 -0
  53. package/dist/types/components/apollo-data-donut/apollo-data-donut.stories.d.ts +5 -0
  54. package/dist/types/components/apollo-data-heat-map/apollo-data-heat-map.d.ts +140 -0
  55. package/dist/types/components/apollo-data-heat-map/apollo-data-heat-map.stories.d.ts +5 -0
  56. package/dist/types/components/apollo-data-line/apollo-data-line.stories.d.ts +5 -0
  57. package/dist/types/components/apollo-data-scatter/apollo-data-scatter.d.ts +1 -3
  58. package/dist/types/components/apollo-data-scatter/apollo-data-scatter.stories.d.ts +5 -0
  59. package/dist/types/components/apollo-data-world-map/apollo-data-world-map.d.ts +281 -0
  60. package/dist/types/components/apollo-data-world-map/apollo-data-world-map.stories.d.ts +5 -0
  61. package/dist/types/components.d.ts +128 -8
  62. package/dist/types/examples/apollo-data-heat-map.examples.d.ts +11 -0
  63. package/dist/types/examples/apollo-data-scatter.examples.d.ts +1 -1
  64. package/dist/types/examples/apollo-data-world-map.examples.d.ts +11 -0
  65. package/dist/types/examples/index.d.ts +2 -0
  66. package/dist/types/stencil-public-runtime.d.ts +23 -2
  67. package/dist/types/utils/code-generator.d.ts +1 -3
  68. package/package.json +8 -8
  69. package/src/examples/apollo-data-bar.examples.ts +157 -157
  70. package/src/examples/apollo-data-heat-map.examples.ts +147 -0
  71. package/src/examples/apollo-data-line.examples.ts +91 -91
  72. package/src/examples/apollo-data-scatter.examples.ts +1 -1
  73. package/src/examples/apollo-data-world-map.examples.ts +57 -0
  74. package/src/examples/index.ts +3 -1
  75. package/dist/apollo-data/p-4ac3c97c.entry.js +0 -1
  76. package/dist/apollo-data/p-BWkrM8dc.js +0 -11
  77. package/dist/apollo-data/p-Bb2nY-Tf.js +0 -2
  78. package/dist/apollo-data/p-e518baac.entry.js +0 -1
  79. package/dist/components/p-7XF5Cax8.js +0 -11
  80. package/dist/components/p-Dws5s-Xe.js +0 -1
@@ -2,9 +2,22 @@ const NAMESPACE = 'apollo-data';
2
2
  const BUILD = /* apollo-data */ { hydratedSelectorName: "hydrated", lazyLoad: true, prop: true, propChangeCallback: false, updatable: true};
3
3
 
4
4
  /*
5
- Stencil Client Platform v4.41.3 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.43.2 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
 
8
+
9
+ // src/utils/get-prop-descriptor.ts
10
+ function getPropertyDescriptor(obj, memberName, getOnly) {
11
+ const stopAt = typeof HTMLElement !== "undefined" ? HTMLElement.prototype : null;
12
+ while (obj && obj !== stopAt) {
13
+ const desc = Object.getOwnPropertyDescriptor(obj, memberName);
14
+ if (desc && (!getOnly || desc.get)) return desc;
15
+ obj = Object.getPrototypeOf(obj);
16
+ }
17
+ return void 0;
18
+ }
19
+
20
+ // src/utils/es2022-rewire-class-members.ts
8
21
  var reWireGetterSetter = (instance, hostRef) => {
9
22
  var _a;
10
23
  const cmpMeta = hostRef.$cmpMeta$;
@@ -12,7 +25,7 @@ var reWireGetterSetter = (instance, hostRef) => {
12
25
  members.map(([memberName, [memberFlags]]) => {
13
26
  if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
14
27
  const ogValue = instance[memberName];
15
- const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName) || Object.getOwnPropertyDescriptor(instance, memberName);
28
+ const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName, true) || Object.getOwnPropertyDescriptor(instance, memberName);
16
29
  if (ogDescriptor) {
17
30
  Object.defineProperty(instance, memberName, {
18
31
  get() {
@@ -25,18 +38,14 @@ var reWireGetterSetter = (instance, hostRef) => {
25
38
  enumerable: true
26
39
  });
27
40
  }
28
- instance[memberName] = hostRef.$instanceValues$.has(memberName) ? hostRef.$instanceValues$.get(memberName) : ogValue;
41
+ if (hostRef.$instanceValues$.has(memberName)) {
42
+ instance[memberName] = hostRef.$instanceValues$.get(memberName);
43
+ } else if (ogValue !== void 0) {
44
+ instance[memberName] = ogValue;
45
+ }
29
46
  }
30
47
  });
31
48
  };
32
- function getPropertyDescriptor(obj, memberName) {
33
- while (obj) {
34
- const desc = Object.getOwnPropertyDescriptor(obj, memberName);
35
- if (desc == null ? void 0 : desc.get) return desc;
36
- obj = Object.getPrototypeOf(obj);
37
- }
38
- return void 0;
39
- }
40
49
 
41
50
  // src/client/client-host-ref.ts
42
51
  var getHostRef = (ref) => {
@@ -325,15 +334,45 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
325
334
  }
326
335
  }
327
336
  }
328
- } else if (memberName === "key") ; else {
337
+ } else if (memberName === "key") ; else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
338
+ const propName = memberName.slice(5);
339
+ let attrName;
340
+ {
341
+ const hostRef = getHostRef(elm);
342
+ if (hostRef && hostRef.$cmpMeta$ && hostRef.$cmpMeta$.$members$) {
343
+ const memberMeta = hostRef.$cmpMeta$.$members$[propName];
344
+ if (memberMeta && memberMeta[1]) {
345
+ attrName = memberMeta[1];
346
+ }
347
+ }
348
+ }
349
+ if (!attrName) {
350
+ attrName = propName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
351
+ }
352
+ if (newValue == null || newValue === false) {
353
+ if (newValue !== false || elm.getAttribute(attrName) === "") {
354
+ elm.removeAttribute(attrName);
355
+ }
356
+ } else {
357
+ elm.setAttribute(attrName, newValue === true ? "" : newValue);
358
+ }
359
+ return;
360
+ } else if (memberName[0] === "p" && memberName.startsWith("prop:")) {
361
+ const propName = memberName.slice(5);
362
+ try {
363
+ elm[propName] = newValue;
364
+ } catch (e) {
365
+ }
366
+ return;
367
+ } else {
329
368
  const isComplex = isComplexType(newValue);
330
- if ((isProp || isComplex && newValue !== null) && true) {
369
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
331
370
  try {
332
371
  if (!elm.tagName.includes("-")) {
333
372
  const n = newValue == null ? "" : newValue;
334
373
  if (memberName === "list") {
335
374
  isProp = false;
336
- } else if (oldValue == null || elm[memberName] != n) {
375
+ } else if (oldValue == null || elm[memberName] !== n) {
337
376
  if (typeof elm.__lookupSetter__(memberName) === "function") {
338
377
  elm[memberName] = n;
339
378
  } else {
@@ -683,7 +722,7 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
683
722
  if (childrenPromises.length === 0) {
684
723
  postUpdate();
685
724
  } else {
686
- Promise.all(childrenPromises).then(postUpdate);
725
+ Promise.all(childrenPromises).then(postUpdate).catch(postUpdate);
687
726
  hostRef.$flags$ |= 4 /* isWaitingForChildren */;
688
727
  childrenPromises.length = 0;
689
728
  }
@@ -785,13 +824,16 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
785
824
  const didValueChange = newVal !== oldVal && !areBothNaN;
786
825
  if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
787
826
  hostRef.$instanceValues$.set(propName, newVal);
788
- if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
827
+ if (flags & 2 /* hasRendered */) {
789
828
  if (instance.componentShouldUpdate) {
790
- if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
829
+ const shouldUpdate = instance.componentShouldUpdate(newVal, oldVal, propName);
830
+ if (shouldUpdate === false && !(flags & 16 /* isQueuedForUpdate */)) {
791
831
  return;
792
832
  }
793
833
  }
794
- scheduleUpdate(hostRef, false);
834
+ if (!(flags & 16 /* isQueuedForUpdate */)) {
835
+ scheduleUpdate(hostRef, false);
836
+ }
795
837
  }
796
838
  }
797
839
  };
@@ -804,7 +846,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
804
846
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
805
847
  members.map(([memberName, [memberFlags]]) => {
806
848
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
807
- const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
849
+ const { get: origGetter, set: origSetter } = getPropertyDescriptor(prototype, memberName) || {};
808
850
  if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
809
851
  if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
810
852
  if (flags & 1 /* isElementConstructor */ || !origGetter) {
@@ -934,53 +976,64 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
934
976
  // src/runtime/initialize-component.ts
935
977
  var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
936
978
  let Cstr;
937
- if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
938
- hostRef.$flags$ |= 32 /* hasInitializedComponent */;
939
- const bundleId = cmpMeta.$lazyBundleId$;
940
- if (bundleId) {
941
- const CstrImport = loadModule(cmpMeta, hostRef);
942
- if (CstrImport && "then" in CstrImport) {
943
- const endLoad = uniqueTime();
944
- Cstr = await CstrImport;
945
- endLoad();
979
+ try {
980
+ if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
981
+ hostRef.$flags$ |= 32 /* hasInitializedComponent */;
982
+ const bundleId = cmpMeta.$lazyBundleId$;
983
+ if (bundleId) {
984
+ const CstrImport = loadModule(cmpMeta, hostRef);
985
+ if (CstrImport && "then" in CstrImport) {
986
+ const endLoad = uniqueTime();
987
+ Cstr = await CstrImport;
988
+ endLoad();
989
+ } else {
990
+ Cstr = CstrImport;
991
+ }
992
+ if (!Cstr) {
993
+ throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
994
+ }
995
+ if (!Cstr.isProxied) {
996
+ proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
997
+ Cstr.isProxied = true;
998
+ }
999
+ const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
1000
+ {
1001
+ hostRef.$flags$ |= 8 /* isConstructingInstance */;
1002
+ }
1003
+ try {
1004
+ new Cstr(hostRef);
1005
+ } catch (e) {
1006
+ consoleError(e, elm);
1007
+ }
1008
+ {
1009
+ hostRef.$flags$ &= -9 /* isConstructingInstance */;
1010
+ }
1011
+ endNewInstance();
1012
+ {
1013
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1014
+ }
946
1015
  } else {
947
- Cstr = CstrImport;
948
- }
949
- if (!Cstr) {
950
- throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
951
- }
952
- if (!Cstr.isProxied) {
953
- proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
954
- Cstr.isProxied = true;
955
- }
956
- const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
957
- {
958
- hostRef.$flags$ |= 8 /* isConstructingInstance */;
959
- }
960
- try {
961
- new Cstr(hostRef);
962
- } catch (e) {
963
- consoleError(e, elm);
964
- }
965
- {
966
- hostRef.$flags$ &= -9 /* isConstructingInstance */;
967
- }
968
- endNewInstance();
969
- {
970
- fireConnectedCallback(hostRef.$lazyInstance$, elm);
1016
+ Cstr = elm.constructor;
1017
+ const cmpTag = elm.localName;
1018
+ customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
971
1019
  }
1020
+ }
1021
+ const ancestorComponent = hostRef.$ancestorComponent$;
1022
+ const schedule = () => scheduleUpdate(hostRef, true);
1023
+ if (ancestorComponent && ancestorComponent["s-rc"]) {
1024
+ ancestorComponent["s-rc"].push(schedule);
972
1025
  } else {
973
- Cstr = elm.constructor;
974
- const cmpTag = elm.localName;
975
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1026
+ schedule();
1027
+ }
1028
+ } catch (e) {
1029
+ consoleError(e, elm);
1030
+ if (hostRef.$onRenderResolve$) {
1031
+ hostRef.$onRenderResolve$();
1032
+ hostRef.$onRenderResolve$ = void 0;
1033
+ }
1034
+ if (hostRef.$onReadyResolve$) {
1035
+ hostRef.$onReadyResolve$(elm);
976
1036
  }
977
- }
978
- const ancestorComponent = hostRef.$ancestorComponent$;
979
- const schedule = () => scheduleUpdate(hostRef, true);
980
- if (ancestorComponent && ancestorComponent["s-rc"]) {
981
- ancestorComponent["s-rc"].push(schedule);
982
- } else {
983
- schedule();
984
1037
  }
985
1038
  };
986
1039
  var fireConnectedCallback = (instance, elm) => {
@@ -1011,7 +1064,7 @@ var connectedCallback = (elm) => {
1011
1064
  }
1012
1065
  if (cmpMeta.$members$) {
1013
1066
  Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1014
- if (memberFlags & 31 /* Prop */ && memberName in elm && elm[memberName] !== Object.prototype[memberName]) {
1067
+ if (memberFlags & 31 /* Prop */ && Object.prototype.hasOwnProperty.call(elm, memberName)) {
1015
1068
  const value = elm[memberName];
1016
1069
  delete elm[memberName];
1017
1070
  elm[memberName] = value;
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-Bb2nY-Tf.js';
2
- export { s as setNonce } from './index-Bb2nY-Tf.js';
1
+ import { b as bootstrapLazy } from './index-D64asVrg.js';
2
+ export { s as setNonce } from './index-D64asVrg.js';
3
3
  import { g as globalScripts } from './app-globals-DQuL1Twl.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["apollo-data-line-chart_2",[[513,"apollo-data-line-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}],[513,"apollo-data-scatter-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}]]],["apollo-data-bar-chart",[[513,"apollo-data-bar-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}]]],["apollo-data-donut-chart",[[513,"apollo-data-donut-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}]]]], options);
8
+ return bootstrapLazy([["apollo-data-heat-map_4",[[513,"apollo-data-heat-map",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}],[513,"apollo-data-line-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}],[513,"apollo-data-scatter-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}],[513,"apollo-data-world-map-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}]]],["apollo-data-bar-chart",[[513,"apollo-data-bar-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}]]],["apollo-data-donut-chart",[[513,"apollo-data-donut-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -1,7 +1,7 @@
1
- export declare class ApolloBase<TData extends any, TSpec extends any> {
1
+ export declare abstract class ApolloBase<TData, TSpec> {
2
2
  el: HTMLElement;
3
3
  adData: string | any;
4
4
  adSpec?: string | any;
5
- protected getViewData(data: TData, spec?: TSpec): any;
5
+ protected abstract getViewData(data: TData, spec?: TSpec): any;
6
6
  protected renderChart(): Promise<void>;
7
7
  }
@@ -0,0 +1,5 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const MonthlySalesByProduct: Story;
@@ -0,0 +1,5 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const ApolloDataDonut: Story;
@@ -0,0 +1,140 @@
1
+ import { ComponentInterface } from '../../stencil-public-runtime';
2
+ import { ApolloBase } from '../../apollo-data-base';
3
+ export interface HeatMapDataItem {
4
+ xLabel: string;
5
+ yLabel: string;
6
+ value: number;
7
+ }
8
+ export interface HeatMapSpec {
9
+ xAxisTitle?: string;
10
+ yAxisTitle?: string;
11
+ colorRange?: string[];
12
+ tooltip?: 'auto' | 'none';
13
+ }
14
+ export declare class ApolloDataHeatMap extends ApolloBase<HeatMapDataItem[], HeatMapSpec> implements ComponentInterface {
15
+ el: HTMLElement;
16
+ /**
17
+ * Data for the heat map. Each item defines a cell by xLabel, yLabel, and value.
18
+ * @property {string} xLabel - Label for the X-axis (horizontal).
19
+ * @property {string} yLabel - Label for the Y-axis (vertical).
20
+ * @property {number} value - Numeric value encoded as color.
21
+ */
22
+ adData: string | HeatMapDataItem[];
23
+ /**
24
+ * Optional specification for axis titles, color range, and tooltip behavior.
25
+ * @property {string} [xAxisTitle] - Label for the X-axis.
26
+ * @property {string} [yAxisTitle] - Label for the Y-axis.
27
+ * @property {string[]} [colorRange] - Two or more colors for the value scale (Vega interpolates between them).
28
+ * @property {'auto' | 'none'} [tooltip] - Tooltip behavior.
29
+ */
30
+ adSpec: string | HeatMapSpec;
31
+ componentDidRender(): Promise<void>;
32
+ private DEFAULT_COLOR_RANGE;
33
+ protected getViewData(data: HeatMapDataItem[], spec?: HeatMapSpec): Promise<{
34
+ $schema: string;
35
+ description: string;
36
+ width: number;
37
+ height: number;
38
+ padding: {
39
+ left: number;
40
+ top: number;
41
+ bottom: number;
42
+ right: number;
43
+ };
44
+ autosize: {
45
+ type: string;
46
+ resize: boolean;
47
+ };
48
+ data: {
49
+ name: string;
50
+ values: HeatMapDataItem[];
51
+ }[];
52
+ scales: ({
53
+ name: string;
54
+ type: string;
55
+ range: (number | {
56
+ signal: string;
57
+ })[];
58
+ domain: string[];
59
+ padding: number;
60
+ zero?: undefined;
61
+ } | {
62
+ name: string;
63
+ type: string;
64
+ range: string[];
65
+ domain: {
66
+ data: string;
67
+ field: string;
68
+ };
69
+ zero: boolean;
70
+ padding?: undefined;
71
+ })[];
72
+ axes: ({
73
+ orient: string;
74
+ scale: string;
75
+ title: string;
76
+ labelAngle: number;
77
+ labelAlign: string;
78
+ } | {
79
+ orient: string;
80
+ scale: string;
81
+ title: string;
82
+ labelAngle?: undefined;
83
+ labelAlign?: undefined;
84
+ })[];
85
+ legends: {
86
+ type: string;
87
+ fill: string;
88
+ orient: string;
89
+ direction: string;
90
+ title: string;
91
+ titleLimit: number;
92
+ tickCount: number;
93
+ format: string;
94
+ }[];
95
+ marks: {
96
+ type: string;
97
+ from: {
98
+ data: string;
99
+ };
100
+ encode: {
101
+ update: {
102
+ x: {
103
+ scale: string;
104
+ field: string;
105
+ };
106
+ y: {
107
+ scale: string;
108
+ field: string;
109
+ };
110
+ width: {
111
+ scale: string;
112
+ band: number;
113
+ };
114
+ height: {
115
+ scale: string;
116
+ band: number;
117
+ };
118
+ fill: {
119
+ scale: string;
120
+ field: string;
121
+ };
122
+ };
123
+ hover: {
124
+ fill: {
125
+ value: string;
126
+ };
127
+ opacity: {
128
+ value: number;
129
+ };
130
+ };
131
+ enter: {
132
+ tooltip: {
133
+ signal: string;
134
+ };
135
+ };
136
+ };
137
+ }[];
138
+ }>;
139
+ render(): any;
140
+ }
@@ -0,0 +1,5 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const WeatherDayVsMonth: Story;
@@ -0,0 +1,5 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const MonthlySalesByProduct: Story;
@@ -17,9 +17,7 @@ export interface ScatterSpec {
17
17
  xAxisTitle?: string;
18
18
  defaultPointStyle?: PointStyle;
19
19
  pointStyle?: PointStyle;
20
- categoryPointStyleMap?: {
21
- [categoryName: string]: PointStyle;
22
- };
20
+ categoryPointStyleMap?: Record<string, PointStyle>;
23
21
  tooltip?: 'auto' | 'none';
24
22
  }
25
23
  export declare class ApolloDataScatterChart extends ApolloBase<ScatterDataItem[], ScatterSpec> implements ComponentInterface {
@@ -0,0 +1,5 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const ApolloDataScatter: Story;