@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.
- package/README.md +15 -91
- package/dist/apollo-data/apollo-data.esm.js +1 -1
- package/dist/apollo-data/p-25841a73.entry.js +1 -0
- package/dist/apollo-data/p-839050b7.entry.js +1 -0
- package/dist/apollo-data/p-C2k3WBpi.js +11 -0
- package/dist/apollo-data/p-D64asVrg.js +2 -0
- package/dist/apollo-data/{p-b7471c12.entry.js → p-e2c3a317.entry.js} +1 -1
- package/dist/cjs/apollo-data-bar-chart.cjs.entry.js +10 -9
- package/dist/cjs/{apollo-data-base-CxVQ-WVP.js → apollo-data-base-COGMOEqL.js} +7 -11
- package/dist/cjs/apollo-data-donut-chart.cjs.entry.js +3 -3
- package/dist/cjs/{apollo-data-line-chart_2.cjs.entry.js → apollo-data-heat-map_4.cjs.entry.js} +358 -9
- package/dist/cjs/apollo-data.cjs.js +3 -3
- package/dist/cjs/{index-Cl7HgRm0.js → index-Bd5risOy.js} +116 -63
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/apollo-data-base.js +4 -8
- package/dist/collection/collection-manifest.json +5 -2
- package/dist/collection/components/apollo-data-bar/apollo-data-bar.js +8 -7
- package/dist/collection/components/apollo-data-bar/apollo-data-bar.stories.js +122 -0
- package/dist/collection/components/apollo-data-donut/apollo-data-donut.js +1 -1
- package/dist/collection/components/apollo-data-donut/apollo-data-donut.stories.js +132 -0
- package/dist/collection/components/apollo-data-heat-map/apollo-data-heat-map.js +208 -0
- package/dist/collection/components/apollo-data-heat-map/apollo-data-heat-map.stories.js +137 -0
- package/dist/collection/components/apollo-data-line/apollo-data-line.js +8 -6
- package/dist/collection/components/apollo-data-line/apollo-data-line.stories.js +122 -0
- package/dist/collection/components/apollo-data-scatter/apollo-data-scatter.js +1 -1
- package/dist/collection/components/apollo-data-scatter/apollo-data-scatter.stories.js +147 -0
- package/dist/collection/components/apollo-data-world-map/apollo-data-world-map.js +294 -0
- package/dist/collection/components/apollo-data-world-map/apollo-data-world-map.stories.js +126 -0
- package/dist/collection/examples/apollo-data-heat-map.examples.js +131 -0
- package/dist/collection/examples/apollo-data-world-map.examples.js +45 -0
- package/dist/collection/examples/index.js +2 -0
- package/dist/collection/utils/code-generator.js +1 -1
- package/dist/components/apollo-data-bar-chart.js +1 -1
- package/dist/components/apollo-data-donut-chart.js +1 -1
- package/dist/components/apollo-data-heat-map.d.ts +11 -0
- package/dist/components/apollo-data-heat-map.js +1 -0
- package/dist/components/apollo-data-line-chart.js +1 -1
- package/dist/components/apollo-data-scatter-chart.js +1 -1
- package/dist/components/apollo-data-world-map-chart.d.ts +11 -0
- package/dist/components/apollo-data-world-map-chart.js +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-CfbMSXKd.js +11 -0
- package/dist/components/p-gcjU8DVr.js +1 -0
- package/dist/esm/apollo-data-bar-chart.entry.js +10 -9
- package/dist/esm/{apollo-data-base-BWkrM8dc.js → apollo-data-base-C2k3WBpi.js} +7 -11
- package/dist/esm/apollo-data-donut-chart.entry.js +3 -3
- package/dist/esm/{apollo-data-line-chart_2.entry.js → apollo-data-heat-map_4.entry.js} +357 -10
- package/dist/esm/apollo-data.js +4 -4
- package/dist/esm/{index-Bb2nY-Tf.js → index-D64asVrg.js} +116 -63
- package/dist/esm/loader.js +3 -3
- package/dist/types/apollo-data-base.d.ts +2 -2
- package/dist/types/components/apollo-data-bar/apollo-data-bar.stories.d.ts +5 -0
- package/dist/types/components/apollo-data-donut/apollo-data-donut.stories.d.ts +5 -0
- package/dist/types/components/apollo-data-heat-map/apollo-data-heat-map.d.ts +140 -0
- package/dist/types/components/apollo-data-heat-map/apollo-data-heat-map.stories.d.ts +5 -0
- package/dist/types/components/apollo-data-line/apollo-data-line.stories.d.ts +5 -0
- package/dist/types/components/apollo-data-scatter/apollo-data-scatter.d.ts +1 -3
- package/dist/types/components/apollo-data-scatter/apollo-data-scatter.stories.d.ts +5 -0
- package/dist/types/components/apollo-data-world-map/apollo-data-world-map.d.ts +281 -0
- package/dist/types/components/apollo-data-world-map/apollo-data-world-map.stories.d.ts +5 -0
- package/dist/types/components.d.ts +128 -8
- package/dist/types/examples/apollo-data-heat-map.examples.d.ts +11 -0
- package/dist/types/examples/apollo-data-scatter.examples.d.ts +1 -1
- package/dist/types/examples/apollo-data-world-map.examples.d.ts +11 -0
- package/dist/types/examples/index.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +23 -2
- package/dist/types/utils/code-generator.d.ts +1 -3
- package/package.json +8 -8
- package/src/examples/apollo-data-bar.examples.ts +157 -157
- package/src/examples/apollo-data-heat-map.examples.ts +147 -0
- package/src/examples/apollo-data-line.examples.ts +91 -91
- package/src/examples/apollo-data-scatter.examples.ts +1 -1
- package/src/examples/apollo-data-world-map.examples.ts +57 -0
- package/src/examples/index.ts +3 -1
- package/dist/apollo-data/p-4ac3c97c.entry.js +0 -1
- package/dist/apollo-data/p-BWkrM8dc.js +0 -11
- package/dist/apollo-data/p-Bb2nY-Tf.js +0 -2
- package/dist/apollo-data/p-e518baac.entry.js +0 -1
- package/dist/components/p-7XF5Cax8.js +0 -11
- package/dist/components/p-Dws5s-Xe.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var o;Object.entries(null!=(o=n.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=e[o],r=t(Object.getPrototypeOf(e),o,!0)||Object.getOwnPropertyDescriptor(e,o);r&&Object.defineProperty(e,o,{get(){return r.get.call(this)},set(t){r.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(o)?e[o]=n.l.get(o):void 0!==l&&(e[o]=l)}}))},o=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},l=(t,e)=>(0,console.error)(t,e),r="undefined"!=typeof window?window:{},s=r.HTMLElement||class{},i={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},c=!!(()=>{try{return!!r.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})()&&(()=>!!r.document&&Object.getOwnPropertyDescriptor(r.document.adoptedStyleSheets,"length").writable)(),u=!1,a=[],f=[],d=(t,e)=>n=>{t.push(n),u||(u=!0,e&&4&i.i?m(p):i.raf(p))},h=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){l(t)}t.length=0},p=()=>{h(a),h(f),(u=a.length>0)&&i.raf(p)},m=t=>Promise.resolve(undefined).then(t),$=d(f,!0),b=t=>{const e=new URL(t,i.u);return e.origin!==r.location.origin?e.href:e.pathname},v=t=>i.u=t;function y(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(c?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}var w,j=new WeakMap,O=t=>"object"==(t=typeof t)||"function"===t,g=(t,e,...n)=>{let o=null,l=null,r=!1,s=!1;const i=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((r="function"!=typeof t&&!O(o))&&(o=String(o)),r&&s?i[i.length-1].h+=o:i.push(r?S(null,o):o),s=r)};c(n),e&&e.key&&(l=e.key);const u=S(t,null);return u.p=e,i.length>0&&(u.m=i),u.$=l,u},S=(t,e)=>({i:0,v:t,h:null!=e?e:null,j:null,m:null,p:null,$:null}),M={},k=(t,e)=>null==t||O(t)?t:1&e?String(t):t,E=(t,e,n,l,r,s)=>{if(n===l)return;let i=((t,e)=>e in t)(t,e);if(e.toLowerCase(),"style"===e){for(const e in n)l&&null!=l[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in l)n&&l[e]===n[e]||(e.includes("-")?t.style.setProperty(e,l[e]):t.style[e]=l[e])}else if("key"===e);else{if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let r;{const e=o(t);if(e&&e.o&&e.o.t){const t=e.o.t[n];t&&t[1]&&(r=t[1])}}return r||(r=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==l||!1===l?!1===l&&""!==t.getAttribute(r)||t.removeAttribute(r):t.setAttribute(r,!0===l?"":l))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=l}catch(t){}return}{const o=O(l);if((i||o&&null!==l)&&!r)try{if(t.tagName.includes("-"))t[e]!==l&&(t[e]=l);else{const o=null==l?"":l;"list"===e?i=!1:null!=n&&t[e]===o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!i||4&s||r)&&!o&&1===t.nodeType&&t.setAttribute(e,l=!0===l?"":l)}}},C=(t,e,n)=>{const o=11===e.j.nodeType&&e.j.host?e.j.host:e.j,l=t&&t.p||{},r=e.p||{};for(const t of L(Object.keys(l)))t in r||E(o,t,l[t],void 0,n,e.i);for(const t of L(Object.keys(r)))E(o,t,l[t],r[t],n,e.i)};function L(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var _=!1,x=(t,e,n)=>{const o=e.m[n];let l,s,i=0;if(!r.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.j=r.document.createElement(o.v),C(null,o,_),o.m){const e="template"===o.v?l.content:l;for(i=0;i<o.m.length;++i)s=x(t,o,i),s&&e.appendChild(s)}return l["s-hn"]=w,l},A=(t,e,n,o,l,r)=>{let s,i=t;for(i.shadowRoot&&i.tagName===w&&(i=i.shadowRoot),"template"===n.v&&(i=i.content);l<=r;++l)o[l]&&(s=x(null,n,l),s&&(o[l].j=s,D(i,s,e)))},H=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.j;t&&t.remove()}}},P=(t,e,n=!1)=>t.v===e.v&&(n?(n&&!t.$&&e.$&&(t.$=e.$),!0):t.$===e.$),U=(t,e,n=!1)=>{const o=e.j=t.j,l=t.m,r=e.m;C(t,e,_),null!==l&&null!==r?((t,e,n,o,l=!1)=>{let r,s,i=0,c=0,u=0,a=0,f=e.length-1,d=e[0],h=e[f],p=o.length-1,m=o[0],$=o[p];const b="template"===n.v?t.content:t;for(;i<=f&&c<=p;)if(null==d)d=e[++i];else if(null==h)h=e[--f];else if(null==m)m=o[++c];else if(null==$)$=o[--p];else if(P(d,m,l))U(d,m,l),d=e[++i],m=o[++c];else if(P(h,$,l))U(h,$,l),h=e[--f],$=o[--p];else if(P(d,$,l))U(d,$,l),D(b,d.j,h.j.nextSibling),d=e[++i],$=o[--p];else if(P(h,m,l))U(h,m,l),D(b,h.j,d.j),h=e[--f],m=o[++c];else{for(u=-1,a=i;a<=f;++a)if(e[a]&&null!==e[a].$&&e[a].$===m.$){u=a;break}u>=0?(s=e[u],s.v!==m.v?r=x(e&&e[c],n,u):(U(s,m,l),e[u]=void 0,r=s.j),m=o[++c]):(r=x(e&&e[c],n,c),m=o[++c]),r&&D(d.j.parentNode,r,d.j)}i>f?A(t,null==o[p+1]?null:o[p+1].j,n,o,c,p):c>p&&H(e,i,f)})(o,l,e,r,n):null!==r?A(o,null,e,r,0,r.length-1):!n&&null!==l&&H(l,0,l.length-1)},D=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),R=(t,e,n=!1)=>{const o=t.$hostElement$,l=t.O||S(null,null);var r;const s=(r=e)&&r.v===M?e:g(null,null,e);if(w=o.tagName,n&&s.p)for(const t of Object.keys(s.p))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.p[t]=o[t]);s.v=null,s.i|=4,t.O=s,s.j=l.j=o.shadowRoot||o,U(l,s,n)},W=(t,e)=>{if(e&&!t.S&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.S=()=>{e["s-p"].splice(n-1,1),o()})))}},N=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);W(t,t.M);const n=()=>q(t,e);if(!e)return $(n);queueMicrotask((()=>{n()}))},q=(t,e)=>{const n=t.$hostElement$,o=n;if(!o)throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return l=B(o,e?"componentWillLoad":"componentWillUpdate",void 0,n),l=z(l,(()=>B(o,"componentWillRender",void 0,n))),z(l,(()=>T(t,o,e)))},z=(t,e)=>F(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),F=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,T=async(t,e,n)=>{var o;const l=t.$hostElement$,r=l["s-rc"];V(t,e,l,n),r&&(r.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>Y(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.i|=4,e.length=0)}},V=(t,e,n,o)=>{try{e=e.render(),t.i&=-17,t.i|=2,R(t,e,o)}catch(e){l(e,t.$hostElement$)}return null},Y=t=>{const e=t.$hostElement$,n=e,o=t.M;B(n,"componentDidRender",void 0,e),64&t.i?B(n,"componentDidUpdate",void 0,e):(t.i|=64,G(e),B(n,"componentDidLoad",void 0,e),t.k(e),o||Z()),t.S&&(t.S(),t.S=void 0),512&t.i&&m((()=>N(t,!1))),t.i&=-517},Z=()=>{m((()=>(t=>{const e=i.ce("appload",{detail:{namespace:"apollo-data"}});return t.dispatchEvent(e),e})(r)))},B=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){l(t,o)}},G=t=>t.classList.add("hydrated"),I=(t,e,n,l)=>{const r=o(t);if(!r)return;const s=t,i=r.l.get(e),c=r.i,u=s;n=k(n,l.t[e][0]);const a=Number.isNaN(i)&&Number.isNaN(n);if(n!==i&&!a&&(r.l.set(e,n),2&c)){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(n,i,e)&&!(16&c))return;16&c||N(r,!1)}},J=(e,n)=>{var l,r;const s=e.prototype;if(n.t){const c=Object.entries(null!=(l=n.t)?l:{});c.map((([e,[l]])=>{if(31&l||32&l){const{get:r,set:i}=t(s,e)||{};r&&(n.t[e][0]|=2048),i&&(n.t[e][0]|=4096),Object.defineProperty(s,e,{get(){return r?r.apply(this):(t=e,o(this).l.get(t));var t},configurable:!0,enumerable:!0}),Object.defineProperty(s,e,{set(t){const r=o(this);if(r){if(i)return void 0===(32&l?this[e]:r.$hostElement$[e])&&r.l.get(e)&&(t=r.l.get(e)),i.apply(this,[k(t,l)]),void I(this,e,t=32&l?this[e]:r.$hostElement$[e],n);I(this,e,t,n)}}})}}));{const t=new Map;s.attributeChangedCallback=function(e,l,r){i.jmp((()=>{var i;const u=t.get(e),a=o(this);if(this.hasOwnProperty(u),s.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==r)return;if(null==u){const t=null==a?void 0:a.i;if(a&&t&&!(8&t)&&r!==l){const o=this,s=null==(i=n.C)?void 0:i[e];null==s||s.forEach((n=>{const[[s,i]]=Object.entries(n);null!=o[s]&&(128&t||1&i)&&o[s].call(o,r,l,e)}))}return}const f=c.find((([t])=>t===u));f&&4&f[1][0]&&(r=null!==r&&"false"!==r);const d=Object.getOwnPropertyDescriptor(s,u);r==this[u]||d.get&&!d.set||(this[u]=r)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=n.C)?r:{}),...c.filter((([t,e])=>31&e[0])).map((([e,n])=>{const o=n[1]||e;return t.set(o,e),o}))]))}}return e},K=(t,e)=>{const r={i:e[0],L:e[1]};try{r.t=e[2];const s=t.prototype.connectedCallback,c=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const o={i:0,$hostElement$:t,o:e,l:new Map,_:new Map};o.A=new Promise((t=>o.k=t)),t["s-p"]=[],t["s-rc"]=[];const l=o;t.__stencil__getHostRef=()=>l,512&e.i&&n(t,o)})(this,r)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!o(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&i.i)){const e=o(t);if(!e)return;const n=e.o,r=()=>{};if(1&e.i)(null==e?void 0:e.H)||(null==e?void 0:e.A)&&e.A.then((()=>{}));else{e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){W(e,e.M=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e)=>{try{32&e.i||(e.i|=32,customElements.whenDefined(t.localName).then((()=>e.i|=128)));const n=e.M,o=()=>N(e,!0);n&&n["s-rc"]?n["s-rc"].push(o):o()}catch(n){l(n,t),e.S&&(e.S(),e.S=void 0),e.k&&e.k(t)}})(t,e)}r()}})(this),s&&s.call(this)},disconnectedCallback(){(async t=>{1&i.i||o(t),j.has(t)&&j.delete(t),t.shadowRoot&&j.has(t.shadowRoot)&&j.delete(t.shadowRoot)})(this),c&&c.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${r.L}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else y.call(this,r)}}),Object.defineProperty(t,"is",{value:r.L,configurable:!0}),J(t,r)}catch(e){return l(e),t}},Q=t=>i.P=t,X=t=>Object.assign(i,t);function tt(t,e){R({$hostElement$:e},t)}function et(t){return t}export{M as H,Q as a,X as b,s as c,b as g,g as h,K as p,tt as r,v as s,et as t}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, g as getElement, h, H as Host } from './index-
|
|
2
|
-
import { A as ApolloBase } from './apollo-data-base-
|
|
1
|
+
import { r as registerInstance, g as getElement, h, H as Host } from './index-D64asVrg.js';
|
|
2
|
+
import { A as ApolloBase } from './apollo-data-base-C2k3WBpi.js';
|
|
3
3
|
import { C as CHART_COLORS } from './constants-2nuV5Vny.js';
|
|
4
4
|
|
|
5
5
|
const FONT_FAMILY = "apple-system, system-ui, 'Segoe UI', Arial, Helvetica, Roboto, sans-serif";
|
|
@@ -19,12 +19,13 @@ const ApolloDataBarChart = class extends ApolloBase {
|
|
|
19
19
|
await this.renderChart();
|
|
20
20
|
}
|
|
21
21
|
injectTooltipStyles() {
|
|
22
|
-
|
|
22
|
+
const chartClass = this.constructor;
|
|
23
|
+
if (chartClass.tooltipStylesInjected) {
|
|
23
24
|
return;
|
|
24
25
|
}
|
|
25
26
|
const styleId = 'apollo-data-bar-tooltip-styles';
|
|
26
27
|
if (document.getElementById(styleId)) {
|
|
27
|
-
|
|
28
|
+
chartClass.tooltipStylesInjected = true;
|
|
28
29
|
return;
|
|
29
30
|
}
|
|
30
31
|
const style = document.createElement('style');
|
|
@@ -73,16 +74,16 @@ const ApolloDataBarChart = class extends ApolloBase {
|
|
|
73
74
|
}
|
|
74
75
|
`;
|
|
75
76
|
document.head.appendChild(style);
|
|
76
|
-
|
|
77
|
+
chartClass.tooltipStylesInjected = true;
|
|
77
78
|
}
|
|
78
|
-
// @ts-ignore
|
|
79
79
|
async getViewData(data, spec) {
|
|
80
|
+
const componentTag = this.el?.tagName?.toLowerCase() ?? 'apollo-data-bar-chart';
|
|
80
81
|
if (!spec) {
|
|
81
|
-
throw new Error(
|
|
82
|
+
throw new Error(`adSpec is required for ${componentTag}`);
|
|
82
83
|
}
|
|
83
84
|
const { tooltipPrefix = '', currencySymbol = '' } = spec;
|
|
84
85
|
if (!data || data.length === 0) {
|
|
85
|
-
throw new Error(
|
|
86
|
+
throw new Error(`Data is required for ${componentTag}`);
|
|
86
87
|
}
|
|
87
88
|
const uniqueCategories = Array.from(new Set(data.map(item => item.category)));
|
|
88
89
|
const formatNumber = tooltipPrefix ? '.2f' : '.0f';
|
|
@@ -305,7 +306,7 @@ const ApolloDataBarChart = class extends ApolloBase {
|
|
|
305
306
|
};
|
|
306
307
|
}
|
|
307
308
|
render() {
|
|
308
|
-
return (h(Host, { key: '
|
|
309
|
+
return (h(Host, { key: 'a0aebbff4fb177de35eb90329de81a1098663620' }, h("div", { key: '9e753e876df877d46254a02349850414914d9231', id: "container", style: { width: '100%', height: '100%' } })));
|
|
309
310
|
}
|
|
310
311
|
};
|
|
311
312
|
|
|
@@ -22829,7 +22829,7 @@ var boundsStream$1 = {
|
|
|
22829
22829
|
boundsStream$1.lineEnd = boundsLineEnd;
|
|
22830
22830
|
if (areaRingSum$1 < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);
|
|
22831
22831
|
else if (deltaSum > epsilon$3) phi1 = 90;
|
|
22832
|
-
else if (deltaSum < -
|
|
22832
|
+
else if (deltaSum < -epsilon$3) phi0 = -90;
|
|
22833
22833
|
range$4[0] = lambda0, range$4[1] = lambda1;
|
|
22834
22834
|
},
|
|
22835
22835
|
sphere: function() {
|
|
@@ -23430,7 +23430,7 @@ function polygonContains(polygon, point) {
|
|
|
23430
23430
|
// from the point to the South pole. If it is zero, then the point is the
|
|
23431
23431
|
// same side as the South pole.
|
|
23432
23432
|
|
|
23433
|
-
return (angle < -
|
|
23433
|
+
return (angle < -epsilon$3 || angle < epsilon$3 && sum < -epsilon2) ^ (winding & 1);
|
|
23434
23434
|
}
|
|
23435
23435
|
|
|
23436
23436
|
function clip$1(pointVisible, clipLine, interpolate, start) {
|
|
@@ -23881,7 +23881,7 @@ function clipLine(a, b, x0, y0, x1, y1) {
|
|
|
23881
23881
|
return true;
|
|
23882
23882
|
}
|
|
23883
23883
|
|
|
23884
|
-
var clipMax = 1e9, clipMin = -
|
|
23884
|
+
var clipMax = 1e9, clipMin = -clipMax;
|
|
23885
23885
|
|
|
23886
23886
|
// TODO Use d3-polygon’s polygonContains here for the ring check?
|
|
23887
23887
|
// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?
|
|
@@ -67611,17 +67611,12 @@ async function _embed(el, spec, opts = {}, loader) {
|
|
|
67611
67611
|
return { view, spec, vgSpec, finalize, embedOptions: opts };
|
|
67612
67612
|
}
|
|
67613
67613
|
|
|
67614
|
-
// @ts-ignore
|
|
67615
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint
|
|
67616
67614
|
class ApolloBase {
|
|
67617
|
-
// @ts-ignore
|
|
67618
|
-
getViewData(data, spec) {
|
|
67619
|
-
throw new Error('getViewData is not implemented');
|
|
67620
|
-
}
|
|
67621
67615
|
async renderChart() {
|
|
67622
67616
|
// Wait for shadow DOM to be ready
|
|
67623
|
-
await new Promise(resolve =>
|
|
67624
|
-
|
|
67617
|
+
await new Promise(resolve => {
|
|
67618
|
+
setTimeout(resolve, 0);
|
|
67619
|
+
});
|
|
67625
67620
|
const container = this.el?.shadowRoot?.querySelector('#container');
|
|
67626
67621
|
if (!container) {
|
|
67627
67622
|
return;
|
|
@@ -67633,6 +67628,7 @@ class ApolloBase {
|
|
|
67633
67628
|
spec = typeof this.adSpec === 'string' ? JSON.parse(this.adSpec) : this.adSpec;
|
|
67634
67629
|
}
|
|
67635
67630
|
catch (err) {
|
|
67631
|
+
// eslint-disable-next-line no-console
|
|
67636
67632
|
console.error('Error parsing data/spec', err);
|
|
67637
67633
|
return;
|
|
67638
67634
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, g as getElement, h, H as Host } from './index-
|
|
2
|
-
import { A as ApolloBase } from './apollo-data-base-
|
|
1
|
+
import { r as registerInstance, g as getElement, h, H as Host } from './index-D64asVrg.js';
|
|
2
|
+
import { A as ApolloBase } from './apollo-data-base-C2k3WBpi.js';
|
|
3
3
|
|
|
4
4
|
const ApolloDataDonutChart = class extends ApolloBase {
|
|
5
5
|
constructor(hostRef) {
|
|
@@ -399,7 +399,7 @@ const ApolloDataDonutChart = class extends ApolloBase {
|
|
|
399
399
|
};
|
|
400
400
|
}
|
|
401
401
|
render() {
|
|
402
|
-
return (h(Host, { key: '
|
|
402
|
+
return (h(Host, { key: '5d9ba4976956c4f0d29b9aa8638373895c0c3f7f' }, h("div", { key: '2db6d1418492898de84a167e35ecc8b16d695942', id: "container", style: { width: '100%', height: '100%' } })));
|
|
403
403
|
}
|
|
404
404
|
};
|
|
405
405
|
|
|
@@ -1,7 +1,135 @@
|
|
|
1
|
-
import { r as registerInstance, g as getElement, h, H as Host } from './index-
|
|
2
|
-
import { A as ApolloBase } from './apollo-data-base-
|
|
1
|
+
import { r as registerInstance, g as getElement, h, H as Host } from './index-D64asVrg.js';
|
|
2
|
+
import { A as ApolloBase } from './apollo-data-base-C2k3WBpi.js';
|
|
3
3
|
import { C as CHART_COLORS } from './constants-2nuV5Vny.js';
|
|
4
4
|
|
|
5
|
+
const ApolloDataHeatMap = class extends ApolloBase {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
super();
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
}
|
|
10
|
+
get el() { return getElement(this); }
|
|
11
|
+
/**
|
|
12
|
+
* Data for the heat map. Each item defines a cell by xLabel, yLabel, and value.
|
|
13
|
+
* @property {string} xLabel - Label for the X-axis (horizontal).
|
|
14
|
+
* @property {string} yLabel - Label for the Y-axis (vertical).
|
|
15
|
+
* @property {number} value - Numeric value encoded as color.
|
|
16
|
+
*/
|
|
17
|
+
adData = [];
|
|
18
|
+
/**
|
|
19
|
+
* Optional specification for axis titles, color range, and tooltip behavior.
|
|
20
|
+
* @property {string} [xAxisTitle] - Label for the X-axis.
|
|
21
|
+
* @property {string} [yAxisTitle] - Label for the Y-axis.
|
|
22
|
+
* @property {string[]} [colorRange] - Two or more colors for the value scale (Vega interpolates between them).
|
|
23
|
+
* @property {'auto' | 'none'} [tooltip] - Tooltip behavior.
|
|
24
|
+
*/
|
|
25
|
+
adSpec = {};
|
|
26
|
+
async componentDidRender() {
|
|
27
|
+
await this.renderChart();
|
|
28
|
+
}
|
|
29
|
+
DEFAULT_COLOR_RANGE = ['#e8f4f8', '#0066a1'];
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
async getViewData(data, spec) {
|
|
32
|
+
const rawRange = spec?.colorRange;
|
|
33
|
+
const colorRange = Array.isArray(rawRange) && rawRange.length >= 2 ? rawRange : this.DEFAULT_COLOR_RANGE;
|
|
34
|
+
const tooltip = spec?.tooltip !== 'none';
|
|
35
|
+
const valid = data.filter(d => d != null && typeof d.xLabel === 'string' && typeof d.yLabel === 'string' && d.xLabel !== '' && d.yLabel !== '' && typeof d.value === 'number');
|
|
36
|
+
const xLabels = [...new Set(valid.map(d => d.xLabel))];
|
|
37
|
+
const yLabels = [...new Set(valid.map(d => d.yLabel))];
|
|
38
|
+
return {
|
|
39
|
+
$schema: 'https://vega.github.io/schema/vega/v6.json',
|
|
40
|
+
description: 'A heat map with xLabel and yLabel categories and value encoded as color.',
|
|
41
|
+
width: 450,
|
|
42
|
+
height: 350,
|
|
43
|
+
padding: { left: 5, top: 5, bottom: 5, right: 70 },
|
|
44
|
+
autosize: { type: 'fit', resize: true },
|
|
45
|
+
data: [
|
|
46
|
+
{
|
|
47
|
+
name: 'source',
|
|
48
|
+
values: valid,
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
scales: [
|
|
52
|
+
{
|
|
53
|
+
name: 'xscale',
|
|
54
|
+
type: 'band',
|
|
55
|
+
range: [0, { signal: 'width' }],
|
|
56
|
+
domain: xLabels,
|
|
57
|
+
padding: 0.05,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'yscale',
|
|
61
|
+
type: 'band',
|
|
62
|
+
range: [{ signal: 'height' }, 0],
|
|
63
|
+
domain: yLabels,
|
|
64
|
+
padding: 0.05,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'color',
|
|
68
|
+
type: 'sequential',
|
|
69
|
+
range: colorRange,
|
|
70
|
+
domain: { data: 'source', field: 'value' },
|
|
71
|
+
zero: true,
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
axes: [
|
|
75
|
+
{
|
|
76
|
+
orient: 'bottom',
|
|
77
|
+
scale: 'xscale',
|
|
78
|
+
title: spec?.xAxisTitle ?? 'X',
|
|
79
|
+
labelAngle: -90,
|
|
80
|
+
labelAlign: 'right',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
orient: 'left',
|
|
84
|
+
scale: 'yscale',
|
|
85
|
+
title: spec?.yAxisTitle ?? 'Y',
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
legends: [
|
|
89
|
+
{
|
|
90
|
+
type: 'gradient',
|
|
91
|
+
fill: 'color',
|
|
92
|
+
orient: 'right',
|
|
93
|
+
direction: 'vertical',
|
|
94
|
+
title: 'Value',
|
|
95
|
+
titleLimit: 120,
|
|
96
|
+
tickCount: 5,
|
|
97
|
+
format: 's',
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
marks: [
|
|
101
|
+
{
|
|
102
|
+
type: 'rect',
|
|
103
|
+
from: { data: 'source' },
|
|
104
|
+
encode: {
|
|
105
|
+
...(tooltip && {
|
|
106
|
+
enter: {
|
|
107
|
+
tooltip: {
|
|
108
|
+
signal: "datum.xLabel + ' | ' + datum.yLabel + ' | ' + format(datum.value, ',.2f')",
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
}),
|
|
112
|
+
update: {
|
|
113
|
+
x: { scale: 'xscale', field: 'xLabel' },
|
|
114
|
+
y: { scale: 'yscale', field: 'yLabel' },
|
|
115
|
+
width: { scale: 'xscale', band: 1 },
|
|
116
|
+
height: { scale: 'yscale', band: 1 },
|
|
117
|
+
fill: { scale: 'color', field: 'value' },
|
|
118
|
+
},
|
|
119
|
+
hover: {
|
|
120
|
+
fill: { value: 'firebrick' },
|
|
121
|
+
opacity: { value: 0.8 },
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
render() {
|
|
129
|
+
return (h(Host, { key: 'd15b44f268f153498e61dc7829fe0d45f315a992' }, h("div", { key: '7783444f4675c885980f1cd571737d506e00fdbc', id: "container", style: { width: '100%', height: '100%' } })));
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
|
|
5
133
|
const FONT_FAMILY = "apple-system, system-ui, 'Segoe UI', Arial, Helvetica, Roboto, sans-serif";
|
|
6
134
|
function lineStyleToStrokeDash(lineStyle) {
|
|
7
135
|
switch (lineStyle) {
|
|
@@ -30,12 +158,13 @@ const ApolloDataLineChart = class extends ApolloBase {
|
|
|
30
158
|
await this.renderChart();
|
|
31
159
|
}
|
|
32
160
|
injectTooltipStyles() {
|
|
33
|
-
|
|
161
|
+
const chartClass = this.constructor;
|
|
162
|
+
if (chartClass.tooltipStylesInjected) {
|
|
34
163
|
return;
|
|
35
164
|
}
|
|
36
165
|
const styleId = 'apollo-data-line-tooltip-styles';
|
|
37
166
|
if (document.getElementById(styleId)) {
|
|
38
|
-
|
|
167
|
+
chartClass.tooltipStylesInjected = true;
|
|
39
168
|
return;
|
|
40
169
|
}
|
|
41
170
|
const style = document.createElement('style');
|
|
@@ -84,16 +213,17 @@ const ApolloDataLineChart = class extends ApolloBase {
|
|
|
84
213
|
}
|
|
85
214
|
`;
|
|
86
215
|
document.head.appendChild(style);
|
|
87
|
-
|
|
216
|
+
chartClass.tooltipStylesInjected = true;
|
|
88
217
|
}
|
|
89
218
|
// @ts-ignore
|
|
90
219
|
async getViewData(data, spec) {
|
|
220
|
+
const componentTag = this.el?.tagName?.toLowerCase() ?? 'apollo-data-line-chart';
|
|
91
221
|
if (!spec) {
|
|
92
|
-
throw new Error(
|
|
222
|
+
throw new Error(`adSpec is required for ${componentTag}`);
|
|
93
223
|
}
|
|
94
224
|
const { tooltipPrefix = '', currencySymbol = '' } = spec;
|
|
95
225
|
if (!data || data.length === 0) {
|
|
96
|
-
throw new Error(
|
|
226
|
+
throw new Error(`Data is required for ${componentTag}`);
|
|
97
227
|
}
|
|
98
228
|
const uniqueCategories = Array.from(new Set(data.map(item => item.category)));
|
|
99
229
|
const uniqueXValues = [...new Set(data.map(item => item.xValue))].sort((a, b) => a - b);
|
|
@@ -284,7 +414,7 @@ const ApolloDataLineChart = class extends ApolloBase {
|
|
|
284
414
|
};
|
|
285
415
|
}
|
|
286
416
|
render() {
|
|
287
|
-
return (h(Host, { key: '
|
|
417
|
+
return (h(Host, { key: 'fd64f4abb624b14a878808b23345910c9b23a72c' }, h("div", { key: 'aeda5086730862ca1368a0374caf2d918969839d', id: "container", style: { width: '100%', height: '100%' } })));
|
|
288
418
|
}
|
|
289
419
|
};
|
|
290
420
|
|
|
@@ -524,8 +654,225 @@ const ApolloDataScatterChart = class extends ApolloBase {
|
|
|
524
654
|
};
|
|
525
655
|
}
|
|
526
656
|
render() {
|
|
527
|
-
return (h(Host, { key: '
|
|
657
|
+
return (h(Host, { key: 'f6c1e8d9e9a6ba41dbbf8c2c5737895b96b0915d' }, h("div", { key: '2aeba82bc31c5995a3d5b532c339f5b45ae850f7', id: "container", style: { width: '100%', height: '100%' } })));
|
|
658
|
+
}
|
|
659
|
+
};
|
|
660
|
+
|
|
661
|
+
const ApolloDataWorldMapChart = class extends ApolloBase {
|
|
662
|
+
constructor(hostRef) {
|
|
663
|
+
super();
|
|
664
|
+
registerInstance(this, hostRef);
|
|
665
|
+
}
|
|
666
|
+
get el() { return getElement(this); }
|
|
667
|
+
/**
|
|
668
|
+
* Represents a single data point in the world map chart.
|
|
669
|
+
* @property {number} lon - Longitude coordinate used to position the point on the map.
|
|
670
|
+
* @property {number} lat - Latitude coordinate used to position the point on the map.
|
|
671
|
+
* @property {number} value - A numeric metric tied to the point.
|
|
672
|
+
* @property {string} label - Label displayed for the place or location represented by the point.
|
|
673
|
+
*/
|
|
674
|
+
adData = [];
|
|
675
|
+
/**
|
|
676
|
+
* @property {string} pinColor - Color of the pin representing the point.
|
|
677
|
+
* @property {'circle' | 'square' | 'triangle'} pinShape - Shape of the pin representing the point.
|
|
678
|
+
*/
|
|
679
|
+
adSpec = {};
|
|
680
|
+
async componentDidRender() {
|
|
681
|
+
await this.renderChart();
|
|
682
|
+
}
|
|
683
|
+
// @ts-ignore
|
|
684
|
+
// eslint-disable-next-line class-methods-use-this
|
|
685
|
+
async getViewData(data, spec) {
|
|
686
|
+
const pinColor = spec?.pinColor || '#d3544b';
|
|
687
|
+
const pinShape = spec?.pinShape || 'circle';
|
|
688
|
+
return {
|
|
689
|
+
$schema: 'https://vega.github.io/schema/vega/v6.json',
|
|
690
|
+
description: 'World map + tooltip + points.',
|
|
691
|
+
width: 600,
|
|
692
|
+
height: 400,
|
|
693
|
+
autosize: 'none',
|
|
694
|
+
background: '#cfe3f1',
|
|
695
|
+
signals: [
|
|
696
|
+
{
|
|
697
|
+
name: 'scale',
|
|
698
|
+
value: 85,
|
|
699
|
+
on: [
|
|
700
|
+
{
|
|
701
|
+
events: { type: 'wheel', consume: true },
|
|
702
|
+
update: 'clamp(scale * pow(1.002, -event.deltaY), 85, 2000)',
|
|
703
|
+
},
|
|
704
|
+
],
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
name: 'xc',
|
|
708
|
+
value: 0,
|
|
709
|
+
on: [{ events: 'mousedown', update: 'x()' }],
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
name: 'yc',
|
|
713
|
+
value: 0,
|
|
714
|
+
on: [{ events: 'mousedown', update: 'y()' }],
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
name: 'xo',
|
|
718
|
+
value: 300,
|
|
719
|
+
on: [{ events: 'mousedown', update: 'tx' }],
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
name: 'yo',
|
|
723
|
+
value: 175,
|
|
724
|
+
on: [{ events: 'mousedown', update: 'ty' }],
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
name: 'tx',
|
|
728
|
+
value: 300,
|
|
729
|
+
on: [
|
|
730
|
+
{
|
|
731
|
+
events: '[mousedown, window:mouseup] > window:mousemove',
|
|
732
|
+
update: 'xo - (x() - xc)',
|
|
733
|
+
},
|
|
734
|
+
],
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
name: 'ty',
|
|
738
|
+
value: 270,
|
|
739
|
+
on: [
|
|
740
|
+
{
|
|
741
|
+
events: '[mousedown, window:mouseup] > window:mousemove',
|
|
742
|
+
update: 'clamp(yo + y() - yc, -scale * 0.5, scale * 2.5 + height)',
|
|
743
|
+
},
|
|
744
|
+
],
|
|
745
|
+
},
|
|
746
|
+
],
|
|
747
|
+
projections: [
|
|
748
|
+
{
|
|
749
|
+
name: 'projection',
|
|
750
|
+
type: 'mercator',
|
|
751
|
+
scale: { signal: 'scale' },
|
|
752
|
+
rotate: [{ signal: '-(tx - width / 2) * 180 / (scale * PI)' }, 0, 0],
|
|
753
|
+
center: [0, 0],
|
|
754
|
+
translate: [{ signal: 'width / 2' }, { signal: 'ty' }],
|
|
755
|
+
},
|
|
756
|
+
],
|
|
757
|
+
data: [
|
|
758
|
+
{
|
|
759
|
+
name: 'names',
|
|
760
|
+
url: 'https://raw.githubusercontent.com/KoGor/Map-Icons-Generator/master/data/world-110m-country-names.tsv',
|
|
761
|
+
format: { type: 'tsv' },
|
|
762
|
+
transform: [{ type: 'formula', as: 'id', expr: 'toNumber(datum.id)' }],
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
name: 'metrics',
|
|
766
|
+
values: data,
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
name: 'world',
|
|
770
|
+
url: 'https://vega.github.io/editor/data/world-110m.json',
|
|
771
|
+
format: { type: 'topojson', feature: 'countries' },
|
|
772
|
+
transform: [
|
|
773
|
+
{
|
|
774
|
+
type: 'lookup',
|
|
775
|
+
from: 'names',
|
|
776
|
+
key: 'id',
|
|
777
|
+
fields: ['id'],
|
|
778
|
+
values: ['name'],
|
|
779
|
+
as: ['name'],
|
|
780
|
+
},
|
|
781
|
+
{ type: 'filter', expr: "datum.name != 'Antarctica'" },
|
|
782
|
+
],
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
name: 'points',
|
|
786
|
+
source: 'metrics',
|
|
787
|
+
transform: [
|
|
788
|
+
{ type: 'filter', expr: 'isValid(datum.lon) && isValid(datum.lat)' },
|
|
789
|
+
{
|
|
790
|
+
type: 'geopoint',
|
|
791
|
+
projection: 'projection',
|
|
792
|
+
fields: ['lon', 'lat'],
|
|
793
|
+
as: ['x', 'y'],
|
|
794
|
+
},
|
|
795
|
+
],
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
name: 'continentLabels',
|
|
799
|
+
values: [
|
|
800
|
+
{ name: 'North America', lon: -105, lat: 45 },
|
|
801
|
+
{ name: 'South America', lon: -60, lat: -15 },
|
|
802
|
+
{ name: 'Europe', lon: 15, lat: 52 },
|
|
803
|
+
{ name: 'Africa', lon: 20, lat: 5 },
|
|
804
|
+
{ name: 'Asia', lon: 90, lat: 35 },
|
|
805
|
+
{ name: 'Oceania', lon: 135, lat: -25 },
|
|
806
|
+
],
|
|
807
|
+
transform: [
|
|
808
|
+
{
|
|
809
|
+
type: 'geopoint',
|
|
810
|
+
projection: 'projection',
|
|
811
|
+
fields: ['lon', 'lat'],
|
|
812
|
+
as: ['x', 'y'],
|
|
813
|
+
},
|
|
814
|
+
],
|
|
815
|
+
},
|
|
816
|
+
],
|
|
817
|
+
marks: [
|
|
818
|
+
{
|
|
819
|
+
type: 'shape',
|
|
820
|
+
from: { data: 'world' },
|
|
821
|
+
transform: [{ type: 'geoshape', projection: 'projection' }],
|
|
822
|
+
encode: {
|
|
823
|
+
update: {
|
|
824
|
+
fill: { value: '#8fbf8f' },
|
|
825
|
+
stroke: { value: '#6c8c8c' },
|
|
826
|
+
strokeWidth: { value: 0.7 },
|
|
827
|
+
tooltip: { signal: "{Country: datum.name ? datum.name : 'Unknown'}" },
|
|
828
|
+
},
|
|
829
|
+
hover: {
|
|
830
|
+
stroke: { value: '#2b3a42' },
|
|
831
|
+
strokeWidth: { value: 1.3 },
|
|
832
|
+
},
|
|
833
|
+
},
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
type: 'symbol',
|
|
837
|
+
from: { data: 'points' },
|
|
838
|
+
encode: {
|
|
839
|
+
update: {
|
|
840
|
+
x: { field: 'x' },
|
|
841
|
+
y: { field: 'y' },
|
|
842
|
+
size: { value: 80 },
|
|
843
|
+
fill: { value: pinColor },
|
|
844
|
+
stroke: { value: 'white' },
|
|
845
|
+
shape: { value: pinShape },
|
|
846
|
+
strokeWidth: { value: 1 },
|
|
847
|
+
tooltip: {
|
|
848
|
+
signal: '{Label: datum.label, Value: datum.value, Latitude: datum.lat, Longitude: datum.lon}',
|
|
849
|
+
},
|
|
850
|
+
},
|
|
851
|
+
},
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
type: 'text',
|
|
855
|
+
from: { data: 'continentLabels' },
|
|
856
|
+
encode: {
|
|
857
|
+
update: {
|
|
858
|
+
x: { field: 'x' },
|
|
859
|
+
y: { field: 'y' },
|
|
860
|
+
text: { field: 'name' },
|
|
861
|
+
align: { value: 'center' },
|
|
862
|
+
baseline: { value: 'middle' },
|
|
863
|
+
fontSize: { value: 12 },
|
|
864
|
+
fontWeight: { value: '600' },
|
|
865
|
+
fill: { value: '#2b3a42' },
|
|
866
|
+
fillOpacity: { value: 0.5 },
|
|
867
|
+
},
|
|
868
|
+
},
|
|
869
|
+
},
|
|
870
|
+
],
|
|
871
|
+
};
|
|
872
|
+
}
|
|
873
|
+
render() {
|
|
874
|
+
return (h(Host, { key: '8053ea3b9706cdd03a430157b3f63e93c1201d1f' }, h("div", { key: '514807ae8dd4868d3d74e86c4260b7b9967c0ac2', id: "container", style: { width: '100%', height: '100%' } })));
|
|
528
875
|
}
|
|
529
876
|
};
|
|
530
877
|
|
|
531
|
-
export { ApolloDataLineChart as apollo_data_line_chart, ApolloDataScatterChart as apollo_data_scatter_chart };
|
|
878
|
+
export { ApolloDataHeatMap as apollo_data_heat_map, ApolloDataLineChart as apollo_data_line_chart, ApolloDataScatterChart as apollo_data_scatter_chart, ApolloDataWorldMapChart as apollo_data_world_map_chart };
|
package/dist/esm/apollo-data.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, 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
|
/*
|
|
6
|
-
Stencil Client Patch Browser v4.
|
|
6
|
+
Stencil Client Patch Browser v4.43.2 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
var patchBrowser = () => {
|
|
@@ -17,5 +17,5 @@ var patchBrowser = () => {
|
|
|
17
17
|
|
|
18
18
|
patchBrowser().then(async (options) => {
|
|
19
19
|
await globalScripts();
|
|
20
|
-
return bootstrapLazy([["apollo-data-
|
|
20
|
+
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);
|
|
21
21
|
});
|