+
Standalone LineChart (IIS)
+
+ Replace API_BASE_URL and TABLE_ID placeholders before deployment.
+
+
+
+
+
+
+
+
diff --git a/packages/pxweb2-ui/vite.web-component.config.ts b/packages/pxweb2-ui/vite.web-component.config.ts
new file mode 100644
index 000000000..91f4ea1a5
--- /dev/null
+++ b/packages/pxweb2-ui/vite.web-component.config.ts
@@ -0,0 +1,35 @@
+/**
+ * Build configuration for the PxWeb line chart web component bundle.
+ * Uses Vite in library mode to compile src/web-component.ts into a production
+ * ES module output in dist/web-component, with React support and browser-safe
+ * process.env.NODE_ENV handling for runtime compatibility.
+ */
+import { defineConfig } from 'vite';
+import react from '@vitejs/plugin-react';
+
+export default defineConfig({
+ root: __dirname,
+ cacheDir: '../../node_modules/.vite/libs/pxweb2-ui-web-component',
+ plugins: [react()],
+ define: {
+ 'process.env.NODE_ENV': JSON.stringify('production'),
+ },
+ build: {
+ outDir: './dist/web-component/',
+ emptyOutDir: false,
+ reportCompressedSize: true,
+ lib: {
+ entry: 'src/web-component.ts',
+ name: 'PxwebLineChartElement',
+ fileName: 'pxweb-line-chart.wc',
+ formats: ['es'],
+ },
+ rollupOptions: {
+ external: [],
+ output: {
+ intro:
+ 'var process = globalThis.process ?? { env: { NODE_ENV: "production" } };',
+ },
+ },
+ },
+});
diff --git a/packages/pxweb2/src/app/components/Presentation/Presentation.tsx b/packages/pxweb2/src/app/components/Presentation/Presentation.tsx
index b34b20d5f..9ebb0eb00 100644
--- a/packages/pxweb2/src/app/components/Presentation/Presentation.tsx
+++ b/packages/pxweb2/src/app/components/Presentation/Presentation.tsx
@@ -11,7 +11,7 @@ import {
EmptyState,
PxTable,
LocalAlert,
- Chart,
+ LineChart,
} from '@pxweb2/pxweb2-ui';
import useTableData from '../../context/useTableData';
import useVariables from '../../context/useVariables';
@@ -276,10 +276,14 @@ export function Presentation({
ref={gradientContainerRef}
>