Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions packages/charts-components/templates/vue/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
* limitations under the License.
*/

import './assets/main.css';
import "./assets/main.css";

import { createApp } from 'vue';
import App from './App.vue';
import { createApp } from "vue";
import App from "./App.vue";

import { defineCustomElements as defineCalciteElements } from '@esri/calcite-components/dist/loader';
import { defineCustomElements as defineChartsElements } from '@arcgis/charts-components/dist/loader';
import { defineCustomElements as defineCalciteElements } from "@esri/calcite-components/dist/loader";
import { defineCustomElements as defineChartsElements } from "@arcgis/charts-components/dist/loader";

// define custom elements in the browser, and load the assets from the CDN
defineCalciteElements(window, { resourcesUrl: 'https://js.arcgis.com/calcite-components/4.29/assets' });
defineChartsElements(window, { resourcesUrl: 'https://js.arcgis.com/charts-components/4.29/t9n' });
defineCalciteElements(window, { resourcesUrl: "https://js.arcgis.com/calcite-components/2.5.1/assets" });
defineChartsElements(window, { resourcesUrl: "https://js.arcgis.com/charts-components/4.29/t9n" });

createApp(App).mount('#app');
createApp(App).mount("#app");
20 changes: 10 additions & 10 deletions packages/charts-components/templates/webpack/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@
* limitations under the License.
*/

import { ScatterPlotModel } from '@arcgis/charts-model';
import { loadFeatureLayer } from './load-data';
import { ScatterPlotModel } from "@arcgis/charts-model";
import { loadFeatureLayer } from "./load-data";

import { defineCustomElements as defineCalciteElements } from '@esri/calcite-components/dist/loader';
import { defineCustomElements as defineChartsElements } from '@arcgis/charts-components/dist/loader';
import { defineCustomElements as defineCalciteElements } from "@esri/calcite-components/dist/loader";
import { defineCustomElements as defineChartsElements } from "@arcgis/charts-components/dist/loader";

// define custom elements in the browser, and load the assets from the CDN
defineCalciteElements(window, { resourcesUrl: 'https://js.arcgis.com/calcite-components/4.29/assets' });
defineChartsElements(window, { resourcesUrl: 'https://js.arcgis.com/charts-components/4.29/t9n' });
defineCalciteElements(window, { resourcesUrl: "https://js.arcgis.com/calcite-components/2.5.1/assets" });
defineChartsElements(window, { resourcesUrl: "https://js.arcgis.com/charts-components/4.29/t9n" });

(async () => {
const scatterPlotRef = document.querySelector('arcgis-charts-scatter-plot');
const scatterPlotRef = document.querySelector("arcgis-charts-scatter-plot");

const featureLayer = await loadFeatureLayer('8871626e970a4f3e9d6113ec63a92f2f');
const featureLayer = await loadFeatureLayer("8871626e970a4f3e9d6113ec63a92f2f");

const scatterPlotParams = {
layer: featureLayer,
xAxisFieldName: 'Earnings',
yAxisFieldName: 'Cost',
xAxisFieldName: "Earnings",
yAxisFieldName: "Cost"
};

const scatterPlotModel = new ScatterPlotModel(scatterPlotParams);
Expand Down