@unovis/ts 1.4.4-beta.2 → 1.4.4
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/components/leaflet-map/modules/map.js +2 -1
- package/components/leaflet-map/modules/map.js.map +1 -1
- package/components/topojson-map/config.js +2 -2
- package/components/topojson-map/config.js.map +1 -1
- package/components/topojson-map/index.js +22 -5
- package/components/topojson-map/index.js.map +1 -1
- package/containers/xy-container/index.js +1 -0
- package/containers/xy-container/index.js.map +1 -1
- package/core/component/index.d.ts +3 -3
- package/core/component/index.js.map +1 -1
- package/core/container/index.js +1 -1
- package/core/container/index.js.map +1 -1
- package/maps/world-simple.json.js +2430 -42
- package/package.json +1 -1
- package/utils/data.js +2 -2
- package/utils/data.js.map +1 -1
|
@@ -108,6 +108,7 @@ function setupMap(mapContainer, config) {
|
|
|
108
108
|
// eslint-disable-next-line no-case-declarations
|
|
109
109
|
const { getMaplibreGLLayer } = yield import('../renderer/mapboxgl-layer.js');
|
|
110
110
|
layer = getMaplibreGLLayer(config, L, maplibre.default);
|
|
111
|
+
layer.addTo(leafletMap);
|
|
111
112
|
maplibreMap = (_b = (_a = layer).getMaplibreMap) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
112
113
|
select(mapContainer).on('wheel', (event) => {
|
|
113
114
|
event.preventDefault();
|
|
@@ -116,9 +117,9 @@ function setupMap(mapContainer, config) {
|
|
|
116
117
|
break;
|
|
117
118
|
case LeafletMapRenderer.Raster:
|
|
118
119
|
layer = L.tileLayer(style);
|
|
120
|
+
layer.addTo(leafletMap);
|
|
119
121
|
break;
|
|
120
122
|
}
|
|
121
|
-
layer.addTo(leafletMap);
|
|
122
123
|
// leaflet-mapbox-gl has a layer positioning issue on far zoom levels which leads to having wrong
|
|
123
124
|
// map points projection. We constrain the view to prevent that.
|
|
124
125
|
constraintMapView(leafletMap);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map.js","sources":["../../../../src/components/leaflet-map/modules/map.ts"],"sourcesContent":["import type L from 'leaflet'\nimport { select, Selection } from 'd3-selection'\nimport type { GeoJSONSource, Map } from 'maplibre-gl'\nimport { feature } from 'topojson-client'\n\n// Types\nimport { GenericDataRecord } from 'types/data'\n\n// Config\nimport { LeafletMapConfigInterface } from '../config'\n\n// Local Types\n\n// Utils\nimport { constraintMapView, mapboxglWheelEventThrottled } from '../renderer/mapboxgl-utils'\n\n// Styles\nimport * as s from '../style'\nimport { LeafletMapRenderer } from '../types'\n\nexport const initialMapCenter: L.LatLngExpression = [36, 14]\nexport const initialMapZoom = 1.9\n\nexport function updateTopoJson<T extends GenericDataRecord> (maplibreMap: Map, config: LeafletMapConfigInterface<T>): void {\n const { topoJSONLayer } = config\n\n if (topoJSONLayer.sources) {\n const featureObject = topoJSONLayer.sources?.objects?.[topoJSONLayer.featureName]\n if (featureObject) {\n const mapSource = maplibreMap.getSource(topoJSONLayer.featureName) as GeoJSONSource\n const featureCollection = feature(topoJSONLayer.sources, featureObject)\n if (mapSource) {\n mapSource.setData(featureCollection)\n } else {\n maplibreMap.addSource(topoJSONLayer.featureName, { type: 'geojson', data: featureCollection })\n }\n }\n }\n\n const fillLayer = maplibreMap.getLayer(`${topoJSONLayer.featureName}-area`)\n if (topoJSONLayer.fillProperty) {\n if (!fillLayer) {\n maplibreMap.addLayer({\n id: `${topoJSONLayer.featureName}-area`,\n type: 'fill',\n source: topoJSONLayer.featureName,\n paint: {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n 'fill-antialias': false,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n 'fill-opacity': topoJSONLayer.fillOpacity,\n },\n })\n }\n maplibreMap.setPaintProperty(`${topoJSONLayer.featureName}-area`, 'fill-color', [\n 'case',\n ['!', ['has', topoJSONLayer.fillProperty]],\n 'rgba(255, 255, 255, 0)',\n ['get', topoJSONLayer.fillProperty],\n ])\n } else if (fillLayer) maplibreMap.removeLayer(`${topoJSONLayer.featureName}-area`)\n\n const strokeLayer = maplibreMap.getLayer(`${topoJSONLayer.featureName}-stroke`)\n if (topoJSONLayer.strokeProperty) {\n if (!strokeLayer) {\n maplibreMap.addLayer({\n id: `${topoJSONLayer.featureName}-stroke`,\n type: 'line',\n source: topoJSONLayer.featureName,\n paint: {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n 'line-opacity': topoJSONLayer.strokeOpacity,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n 'line-width': topoJSONLayer.strokeWidth,\n },\n })\n }\n maplibreMap.setPaintProperty(`${topoJSONLayer.featureName}-stroke`, 'line-color', [\n 'case',\n ['!', ['has', topoJSONLayer.strokeProperty]],\n 'rgba(255, 255, 255, 0)',\n ['get', topoJSONLayer.strokeProperty],\n ])\n } else if (strokeLayer) { maplibreMap.removeLayer(`${topoJSONLayer.featureName}-stroke`) }\n}\n\nexport async function setupMap<T extends GenericDataRecord> (mapContainer: HTMLElement, config: LeafletMapConfigInterface<T>): Promise<{\n leaflet: L.Map;\n layer: L.Layer;\n svgOverlay: Selection<SVGSVGElement, unknown, null, undefined>;\n svgGroup: Selection<SVGGElement, unknown, SVGElement, undefined>;\n}> {\n const { style, renderer, topoJSONLayer } = config\n const leaflet = await import('leaflet')\n const L = leaflet.default\n\n if (!style) {\n console.error('Unovis | Leaflet Map: Please provide style settings in the map configuration object')\n return\n }\n\n const leafletMap = L.map(mapContainer, {\n scrollWheelZoom: renderer === LeafletMapRenderer.Raster, // We define custom scroll event for MapboxGL to enabling smooth zooming\n zoomControl: false,\n zoomDelta: renderer === LeafletMapRenderer.Raster ? 1 : 0.5,\n zoomSnap: renderer === LeafletMapRenderer.Raster ? 1 : 0,\n attributionControl: true,\n center: initialMapCenter,\n zoom: initialMapZoom,\n minZoom: Math.sqrt(mapContainer.offsetWidth) / 17,\n maxZoom: 23,\n maxBounds: L.latLngBounds(\n [-75, -290],\n [85, 290]\n ),\n maxBoundsViscosity: 1,\n })\n\n for (const attr of config.attribution) {\n leafletMap.attributionControl.addAttribution(attr)\n }\n\n let layer: L.Layer | (L.Layer & { getMaplibreMap(): Map })\n let maplibreMap: Map = null\n\n switch (renderer) {\n case LeafletMapRenderer.MapLibre:\n // eslint-disable-next-line no-case-declarations\n const maplibre = await import('maplibre-gl')\n // eslint-disable-next-line no-case-declarations\n const { getMaplibreGLLayer } = await import('../renderer/mapboxgl-layer')\n layer = getMaplibreGLLayer(config, L, maplibre.default)\n maplibreMap = (layer as ReturnType<typeof getMaplibreGLLayer>).getMaplibreMap?.()\n\n select(mapContainer).on('wheel', (event: WheelEvent) => {\n event.preventDefault()\n mapboxglWheelEventThrottled(leafletMap, layer as (L.Layer & { getMaplibreMap(): Map }), event)\n })\n break\n case LeafletMapRenderer.Raster:\n layer = L.tileLayer(style as string)\n break\n }\n layer.addTo(leafletMap)\n\n // leaflet-mapbox-gl has a layer positioning issue on far zoom levels which leads to having wrong\n // map points projection. We constrain the view to prevent that.\n constraintMapView(leafletMap)\n\n if (maplibreMap && topoJSONLayer?.sources) {\n const canvas = maplibreMap.getCanvas()\n const canvasSelection = select(canvas).classed(s.mapboxglCanvas, true)\n const tilePaneSelection = select(leafletMap.getPanes().tilePane)\n\n maplibreMap.on('mousemove', (event) => {\n const layerName = `${topoJSONLayer.featureName}-area`\n const layer = maplibreMap.getLayer(layerName)\n if (!layer) return\n\n const features = maplibreMap.queryRenderedFeatures(event.point, { layers: [layerName] })\n tilePaneSelection.datum(features[0])\n canvasSelection.classed(s.onFeatureHover, Boolean(features[0]))\n })\n\n maplibreMap.on('load', () => {\n updateTopoJson(maplibreMap, config)\n })\n }\n\n const svgOverlay = select(leafletMap.getPanes().overlayPane).append('svg')\n const svgGroup = svgOverlay.append('g')\n\n return {\n leaflet: leafletMap,\n layer,\n svgOverlay,\n svgGroup,\n }\n}\n"],"names":["s.mapboxglCanvas","s.onFeatureHover"],"mappings":";;;;;;;MAoBa,gBAAgB,GAAuB,CAAC,EAAE,EAAE,EAAE,EAAC;AACrD,MAAM,cAAc,GAAG,IAAG;AAEjB,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AQ;SACT,CAAA;;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"map.js","sources":["../../../../src/components/leaflet-map/modules/map.ts"],"sourcesContent":["import type L from 'leaflet'\nimport { select, Selection } from 'd3-selection'\nimport type { GeoJSONSource, Map } from 'maplibre-gl'\nimport { feature } from 'topojson-client'\n\n// Types\nimport { GenericDataRecord } from 'types/data'\n\n// Config\nimport { LeafletMapConfigInterface } from '../config'\n\n// Local Types\n\n// Utils\nimport { constraintMapView, mapboxglWheelEventThrottled } from '../renderer/mapboxgl-utils'\n\n// Styles\nimport * as s from '../style'\nimport { LeafletMapRenderer } from '../types'\n\nexport const initialMapCenter: L.LatLngExpression = [36, 14]\nexport const initialMapZoom = 1.9\n\nexport function updateTopoJson<T extends GenericDataRecord> (maplibreMap: Map, config: LeafletMapConfigInterface<T>): void {\n const { topoJSONLayer } = config\n\n if (topoJSONLayer.sources) {\n const featureObject = topoJSONLayer.sources?.objects?.[topoJSONLayer.featureName]\n if (featureObject) {\n const mapSource = maplibreMap.getSource(topoJSONLayer.featureName) as GeoJSONSource\n const featureCollection = feature(topoJSONLayer.sources, featureObject)\n if (mapSource) {\n mapSource.setData(featureCollection)\n } else {\n maplibreMap.addSource(topoJSONLayer.featureName, { type: 'geojson', data: featureCollection })\n }\n }\n }\n\n const fillLayer = maplibreMap.getLayer(`${topoJSONLayer.featureName}-area`)\n if (topoJSONLayer.fillProperty) {\n if (!fillLayer) {\n maplibreMap.addLayer({\n id: `${topoJSONLayer.featureName}-area`,\n type: 'fill',\n source: topoJSONLayer.featureName,\n paint: {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n 'fill-antialias': false,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n 'fill-opacity': topoJSONLayer.fillOpacity,\n },\n })\n }\n maplibreMap.setPaintProperty(`${topoJSONLayer.featureName}-area`, 'fill-color', [\n 'case',\n ['!', ['has', topoJSONLayer.fillProperty]],\n 'rgba(255, 255, 255, 0)',\n ['get', topoJSONLayer.fillProperty],\n ])\n } else if (fillLayer) maplibreMap.removeLayer(`${topoJSONLayer.featureName}-area`)\n\n const strokeLayer = maplibreMap.getLayer(`${topoJSONLayer.featureName}-stroke`)\n if (topoJSONLayer.strokeProperty) {\n if (!strokeLayer) {\n maplibreMap.addLayer({\n id: `${topoJSONLayer.featureName}-stroke`,\n type: 'line',\n source: topoJSONLayer.featureName,\n paint: {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n 'line-opacity': topoJSONLayer.strokeOpacity,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n 'line-width': topoJSONLayer.strokeWidth,\n },\n })\n }\n maplibreMap.setPaintProperty(`${topoJSONLayer.featureName}-stroke`, 'line-color', [\n 'case',\n ['!', ['has', topoJSONLayer.strokeProperty]],\n 'rgba(255, 255, 255, 0)',\n ['get', topoJSONLayer.strokeProperty],\n ])\n } else if (strokeLayer) { maplibreMap.removeLayer(`${topoJSONLayer.featureName}-stroke`) }\n}\n\nexport async function setupMap<T extends GenericDataRecord> (mapContainer: HTMLElement, config: LeafletMapConfigInterface<T>): Promise<{\n leaflet: L.Map;\n layer: L.Layer;\n svgOverlay: Selection<SVGSVGElement, unknown, null, undefined>;\n svgGroup: Selection<SVGGElement, unknown, SVGElement, undefined>;\n}> {\n const { style, renderer, topoJSONLayer } = config\n const leaflet = await import('leaflet')\n const L = leaflet.default\n\n if (!style) {\n console.error('Unovis | Leaflet Map: Please provide style settings in the map configuration object')\n return\n }\n\n const leafletMap = L.map(mapContainer, {\n scrollWheelZoom: renderer === LeafletMapRenderer.Raster, // We define custom scroll event for MapboxGL to enabling smooth zooming\n zoomControl: false,\n zoomDelta: renderer === LeafletMapRenderer.Raster ? 1 : 0.5,\n zoomSnap: renderer === LeafletMapRenderer.Raster ? 1 : 0,\n attributionControl: true,\n center: initialMapCenter,\n zoom: initialMapZoom,\n minZoom: Math.sqrt(mapContainer.offsetWidth) / 17,\n maxZoom: 23,\n maxBounds: L.latLngBounds(\n [-75, -290],\n [85, 290]\n ),\n maxBoundsViscosity: 1,\n })\n\n for (const attr of config.attribution) {\n leafletMap.attributionControl.addAttribution(attr)\n }\n\n let layer: L.Layer | (L.Layer & { getMaplibreMap(): Map })\n let maplibreMap: Map = null\n\n switch (renderer) {\n case LeafletMapRenderer.MapLibre:\n // eslint-disable-next-line no-case-declarations\n const maplibre = await import('maplibre-gl')\n // eslint-disable-next-line no-case-declarations\n const { getMaplibreGLLayer } = await import('../renderer/mapboxgl-layer')\n layer = getMaplibreGLLayer(config, L, maplibre.default)\n layer.addTo(leafletMap)\n maplibreMap = (layer as ReturnType<typeof getMaplibreGLLayer>).getMaplibreMap?.()\n\n select(mapContainer).on('wheel', (event: WheelEvent) => {\n event.preventDefault()\n mapboxglWheelEventThrottled(leafletMap, layer as (L.Layer & { getMaplibreMap(): Map }), event)\n })\n break\n case LeafletMapRenderer.Raster:\n layer = L.tileLayer(style as string)\n layer.addTo(leafletMap)\n break\n }\n // leaflet-mapbox-gl has a layer positioning issue on far zoom levels which leads to having wrong\n // map points projection. We constrain the view to prevent that.\n constraintMapView(leafletMap)\n\n if (maplibreMap && topoJSONLayer?.sources) {\n const canvas = maplibreMap.getCanvas()\n const canvasSelection = select(canvas).classed(s.mapboxglCanvas, true)\n const tilePaneSelection = select(leafletMap.getPanes().tilePane)\n\n maplibreMap.on('mousemove', (event) => {\n const layerName = `${topoJSONLayer.featureName}-area`\n const layer = maplibreMap.getLayer(layerName)\n if (!layer) return\n\n const features = maplibreMap.queryRenderedFeatures(event.point, { layers: [layerName] })\n tilePaneSelection.datum(features[0])\n canvasSelection.classed(s.onFeatureHover, Boolean(features[0]))\n })\n\n maplibreMap.on('load', () => {\n updateTopoJson(maplibreMap, config)\n })\n }\n\n const svgOverlay = select(leafletMap.getPanes().overlayPane).append('svg')\n const svgGroup = svgOverlay.append('g')\n\n return {\n leaflet: leafletMap,\n layer,\n svgOverlay,\n svgGroup,\n }\n}\n"],"names":["s.mapboxglCanvas","s.onFeatureHover"],"mappings":";;;;;;;M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AAA;QAC1E,MAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QAEvC,OAAO;AACL,YAAA,OAAO,EAAE,UAAU;YACnB,KAAK;YACL,UAAU;YACV,QAAQ;SACT,CAAA;;AACF;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentDefaultConfig } from '../../core/component/config.js';
|
|
2
|
-
import {
|
|
2
|
+
import { MapPointLabelPosition } from './types.js';
|
|
3
3
|
|
|
4
|
-
const TopoJSONMapDefaultConfig = Object.assign(Object.assign({}, ComponentDefaultConfig), { projection:
|
|
4
|
+
const TopoJSONMapDefaultConfig = Object.assign(Object.assign({}, ComponentDefaultConfig), { projection: undefined, duration: 1500, topojson: undefined, mapFeatureName: 'countries', mapFitToPoints: false, zoomExtent: [0.5, 6], zoomDuration: 400, disableZoom: false, zoomFactor: undefined, linkWidth: (d) => { var _a; return (_a = d.width) !== null && _a !== void 0 ? _a : 1; }, linkColor: (d) => { var _a; return (_a = d.color) !== null && _a !== void 0 ? _a : null; }, linkCursor: null, linkId: (d, i) => { var _a; return `${(_a = d.id) !== null && _a !== void 0 ? _a : i}`; }, linkSource: (d) => d.source, linkTarget: (d) => d.target, areaId: (d) => { var _a; return (_a = d.id) !== null && _a !== void 0 ? _a : ''; }, areaColor: (d) => { var _a; return (_a = d.color) !== null && _a !== void 0 ? _a : null; }, areaCursor: null, longitude: (d) => d.longitude, latitude: (d) => d.latitude, pointColor: (d) => { var _a; return (_a = d.color) !== null && _a !== void 0 ? _a : null; }, pointRadius: (d) => { var _a; return (_a = d.radius) !== null && _a !== void 0 ? _a : 8; }, pointStrokeWidth: (d) => { var _a; return (_a = d.strokeWidth) !== null && _a !== void 0 ? _a : 0; }, pointCursor: null, pointLabel: undefined, pointLabelPosition: MapPointLabelPosition.Bottom, pointLabelTextBrightnessRatio: 0.65, pointId: (d) => d.id, heatmapMode: false, heatmapModeBlurStdDeviation: 8, heatmapModeZoomLevelThreshold: 2.5 });
|
|
5
5
|
|
|
6
6
|
export { TopoJSONMapDefaultConfig };
|
|
7
7
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sources":["../../../src/components/topojson-map/config.ts"],"sourcesContent":["import { GeoProjection } from 'd3-geo'\nimport { ComponentConfigInterface, ComponentDefaultConfig } from 'core/component/config'\n\n// Types\nimport { ColorAccessor, NumericAccessor, StringAccessor } from 'types/accessor'\n\n// Local Types\nimport {
|
|
1
|
+
{"version":3,"file":"config.js","sources":["../../../src/components/topojson-map/config.ts"],"sourcesContent":["import { GeoProjection } from 'd3-geo'\nimport { ComponentConfigInterface, ComponentDefaultConfig } from 'core/component/config'\n\n// Types\nimport { ColorAccessor, NumericAccessor, StringAccessor } from 'types/accessor'\n\n// Local Types\nimport { MapPointLabelPosition } from './types'\n\nexport interface TopoJSONMapConfigInterface<\n AreaDatum,\n PointDatum = unknown,\n LinkDatum = unknown,\n> extends ComponentConfigInterface {\n // General\n /** MapProjection (aka D3's GeoProjection) instance. Default: `MapProjection.Kavrayskiy7()` */\n projection?: GeoProjection;\n /** Map data in the TopoJSON topology format. Default: `undefined` */\n topojson?: TopoJSON.Topology;\n /** Name of the map features to be displayed, e.g. 'countries' or 'counties'. Default: `countries` */\n mapFeatureName?: string;\n /** Set initial map fit to points instead of topojson features. Default: `false` */\n mapFitToPoints?: boolean;\n /** Initial zoom level. Default: `undefined` */\n zoomFactor?: number;\n /** Disable pan / zoom interactions. Default: `false` */\n disableZoom?: boolean;\n /** Zoom extent. Default: `[0.5, 6]` */\n zoomExtent?: number[];\n /** Zoom animation duration. Default: `400` */\n zoomDuration?: number;\n\n /** Link width value or accessor function. Default: `d => d.width ?? 1` */\n linkWidth?: NumericAccessor<LinkDatum>;\n /** Link color value or accessor function. Default: `d => d.color ?? null` */\n linkColor?: ColorAccessor<LinkDatum>;\n /** Link cursor value or accessor function. Default: `null` */\n linkCursor?: StringAccessor<LinkDatum>;\n /** Link id accessor function. Default: `d => d.id` */\n linkId?: StringAccessor<LinkDatum>;\n /** Link source accessor function. Default: `d => d.source` */\n linkSource?: ((l: LinkDatum) => number | string | PointDatum);\n /** Link target accessor function. Default: `d => d.target` */\n linkTarget?: ((l: LinkDatum) => number | string | PointDatum);\n\n /** Area id accessor function corresponding to the feature id from TopoJSON. Default: `d => d.id ?? ''` */\n areaId?: StringAccessor<AreaDatum>;\n /** Area color value or accessor function. Default: `d => d.color ?? null` */\n areaColor?: ColorAccessor<AreaDatum>;\n /** Area cursor value or accessor function. Default: `null` */\n areaCursor?: StringAccessor<AreaDatum>;\n\n /** Point color accessor. Default: `d => d.color ?? null` */\n pointColor?: ColorAccessor<PointDatum>;\n /** Point radius accessor. Default: `d => d.radius ?? 8` */\n pointRadius?: NumericAccessor<PointDatum>;\n /** Point stroke width accessor. Default: `d => d.strokeWidth ?? null` */\n pointStrokeWidth?: NumericAccessor<PointDatum>;\n /** Point cursor constant value or accessor function. Default: `null` */\n pointCursor?: StringAccessor<PointDatum>;\n /** Point longitude accessor function. Default: `d => d.longitude ?? null` */\n longitude?: NumericAccessor<PointDatum>;\n /** Point latitude accessor function. Default: `d => d.latitude ?? null` */\n latitude?: NumericAccessor<PointDatum>;\n /** Point label accessor function. Default: `undefined` */\n pointLabel?: StringAccessor<PointDatum>;\n /** Point label position. Default: `Position.Bottom` */\n pointLabelPosition?: MapPointLabelPosition;\n /** Point color brightness ratio for switching between dark and light text label color. Default: `0.65` */\n pointLabelTextBrightnessRatio?: number;\n /** Point id accessor function. Default: `d => d.id` */\n pointId?: ((d: PointDatum, i: number) => string);\n\n /** Enables blur and blending between neighbouring points. Default: `false` */\n heatmapMode?: boolean;\n /** Heatmap blur filter stdDeviation value. Default: `10` */\n heatmapModeBlurStdDeviation?: number;\n /** Zoom level at which the heatmap mode will be disabled. Default: `2.5` */\n heatmapModeZoomLevelThreshold?: number;\n}\n\nexport const TopoJSONMapDefaultConfig: TopoJSONMapConfigInterface<unknown, unknown, unknown> = {\n ...ComponentDefaultConfig,\n projection: undefined,\n duration: 1500,\n topojson: undefined,\n mapFeatureName: 'countries',\n mapFitToPoints: false,\n\n zoomExtent: [0.5, 6],\n zoomDuration: 400,\n disableZoom: false,\n zoomFactor: undefined,\n\n linkWidth: (d: unknown): number => (d as { width: number }).width ?? 1,\n linkColor: (d: unknown): string => (d as { color: string }).color ?? null,\n linkCursor: null,\n linkId: (d: unknown, i: number | undefined): string => `${(d as { id: string }).id ?? i}`,\n linkSource: (d: unknown): (number | string | unknown) => (d as { source: string }).source,\n linkTarget: (d: unknown): (number | string | unknown) => (d as { target: string }).target,\n\n areaId: (d: unknown): string => (d as { id: string }).id ?? '',\n areaColor: (d: unknown): string => (d as { color: string }).color ?? null,\n areaCursor: null,\n\n longitude: (d: unknown): number => (d as { longitude: number }).longitude,\n latitude: (d: unknown): number => (d as { latitude: number }).latitude,\n pointColor: (d: unknown): string => (d as { color: string }).color ?? null,\n pointRadius: (d: unknown): number => (d as { radius: number }).radius ?? 8,\n pointStrokeWidth: (d: unknown): number => (d as { strokeWidth: number }).strokeWidth ?? 0,\n pointCursor: null,\n pointLabel: undefined,\n pointLabelPosition: MapPointLabelPosition.Bottom,\n pointLabelTextBrightnessRatio: 0.65,\n pointId: (d: unknown): string => (d as { id: string }).id,\n\n heatmapMode: false,\n heatmapModeBlurStdDeviation: 8,\n heatmapModeZoomLevelThreshold: 2.5,\n}\n\n"],"names":[],"mappings":";;;AAiFO,MAAM,wBAAwB,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAChC,sBAAsB,CAAA,EAAA,EACzB,UAAU,EAAE,SAAS,EACrB,QAAQ,EAAE,IAAI,EACd,QAAQ,EAAE,SAAS,EACnB,cAAc,EAAE,WAAW,EAC3B,cAAc,EAAE,KAAK,EAErB,UAAU,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,EACpB,YAAY,EAAE,GAAG,EACjB,WAAW,EAAE,KAAK,EAClB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E,CAAC,CAAU,KAAc,CAA0B,CAAC,QAAQ,EACtE,UAAU,EAAE,CAAC,CAAU,KAAY,EAAA,IAAA,EAAA,CAAA,CAAC,OAAA,CAAA,EAAA,GAAC,CAAuB,CAAC,KAAK,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,IAAI,CAAA,EAAA,EAC1E,WAAW,EAAE,CAAC,CAAU,KAAa,EAAA,IAAA,EAAA,CAAA,CAAA,OAAA,CAAC,EAAA,GAAA,CAAwB,CAAC,MAAM,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,CAAC,CAAA,EAAA,EAC1E,gBAAgB,EAAE,CAAC,CAAU,KAAa,EAAA,IAAA,EAAA,CAAA,CAAA,OAAA,CAAC,EAAA,GAAA,CAA6B,CAAC,WAAW,mCAAI,CAAC,CAAA,EAAA,EACzF,WAAW,EAAE,IAAI,EACjB,UAAU,EAAE,SAAS,EACrB,kBAAkB,EAAE,qBAAqB,CAAC,MAAM,EAChD,6BAA6B,EAAE,IAAI,EACnC,OAAO,EAAE,CAAC,CAAU,KAAc,CAAoB,CAAC,EAAE,EAEzD,WAAW,EAAE,KAAK,EAClB,2BAA2B,EAAE,CAAC,EAC9B,6BAA6B,EAAE,GAAG;;;;"}
|
|
@@ -9,7 +9,7 @@ import { isNumber, getString, getNumber, clamp } from '../../utils/data.js';
|
|
|
9
9
|
import { smartTransition } from '../../utils/d3.js';
|
|
10
10
|
import { getColor, hexToBrightness } from '../../utils/color.js';
|
|
11
11
|
import { isStringCSSVariable, getCSSVariableValue } from '../../utils/misc.js';
|
|
12
|
-
import { MapPointLabelPosition } from './types.js';
|
|
12
|
+
import { MapProjection, MapPointLabelPosition } from './types.js';
|
|
13
13
|
import { TopoJSONMapDefaultConfig } from './config.js';
|
|
14
14
|
import { getLonLat, arc } from './utils.js';
|
|
15
15
|
import * as style from './style.js';
|
|
@@ -54,10 +54,14 @@ class TopoJSONMap extends ComponentCore {
|
|
|
54
54
|
this.datamodel.linkSource = config.linkSource;
|
|
55
55
|
this.datamodel.linkTarget = config.linkTarget;
|
|
56
56
|
this.datamodel.data = data;
|
|
57
|
+
// If there was a data change and mapFitToPoints is enabled, we will need to re-fit the map
|
|
58
|
+
this._firstRender = this._firstRender || config.mapFitToPoints;
|
|
57
59
|
}
|
|
58
60
|
setConfig(config) {
|
|
61
|
+
var _a;
|
|
59
62
|
super.setConfig(config);
|
|
60
|
-
|
|
63
|
+
// Setting the default here instead of defaultConfig to prevent mutation from other TopoJSONMap instances
|
|
64
|
+
const newProjection = (_a = this.config.projection) !== null && _a !== void 0 ? _a : MapProjection.Kavrayskiy7();
|
|
61
65
|
if (this._projection) {
|
|
62
66
|
newProjection.scale(this._projection.scale()).translate(this._projection.translate());
|
|
63
67
|
}
|
|
@@ -180,7 +184,8 @@ class TopoJSONMap extends ComponentCore {
|
|
|
180
184
|
.attr('transform', d => {
|
|
181
185
|
const pos = this._projection(getLonLat(d, config.longitude, config.latitude));
|
|
182
186
|
return `translate(${pos[0]},${pos[1]})`;
|
|
183
|
-
})
|
|
187
|
+
})
|
|
188
|
+
.style('opacity', 0);
|
|
184
189
|
pointsEnter.append('circle').attr('class', pointCircle)
|
|
185
190
|
.attr('r', 0)
|
|
186
191
|
.style('fill', (d, i) => getColor(d, config.pointColor, i))
|
|
@@ -194,7 +199,8 @@ class TopoJSONMap extends ComponentCore {
|
|
|
194
199
|
const pos = this._projection(getLonLat(d, config.longitude, config.latitude));
|
|
195
200
|
return `translate(${pos[0]},${pos[1]})`;
|
|
196
201
|
})
|
|
197
|
-
.style('cursor', d => getString(d, config.pointCursor))
|
|
202
|
+
.style('cursor', d => getString(d, config.pointCursor))
|
|
203
|
+
.style('opacity', 1);
|
|
198
204
|
smartTransition(pointsMerged.select(`.${pointCircle}`), duration)
|
|
199
205
|
.attr('r', d => getNumber(d, config.pointRadius) / this._currentZoomLevel)
|
|
200
206
|
.style('fill', (d, i) => getColor(d, config.pointColor, i))
|
|
@@ -244,6 +250,7 @@ class TopoJSONMap extends ComponentCore {
|
|
|
244
250
|
const pointData = points || datamodel.points;
|
|
245
251
|
if (pointData.length === 0)
|
|
246
252
|
return;
|
|
253
|
+
this.fitView();
|
|
247
254
|
const featureCollection = {
|
|
248
255
|
type: 'FeatureCollection',
|
|
249
256
|
features: [{
|
|
@@ -265,8 +272,18 @@ class TopoJSONMap extends ComponentCore {
|
|
|
265
272
|
[this._width * (1 - pad), this._height * (1 - pad)],
|
|
266
273
|
], featureCollection);
|
|
267
274
|
const maxScale = config.zoomExtent[1] * this._initialScale;
|
|
268
|
-
|
|
275
|
+
const fittedScale = this._projection.scale();
|
|
276
|
+
if (fittedScale > maxScale) {
|
|
277
|
+
const fittedTranslate = this._projection.translate();
|
|
278
|
+
const scaleRatio = maxScale / fittedScale;
|
|
269
279
|
this._projection.scale(maxScale);
|
|
280
|
+
this._projection.translate([
|
|
281
|
+
this._width / 2 - (this._width / 2 - fittedTranslate[0]) * scaleRatio,
|
|
282
|
+
this._height / 2 - (this._height / 2 - fittedTranslate[1]) * scaleRatio,
|
|
283
|
+
]);
|
|
284
|
+
}
|
|
285
|
+
// If we don't update the center, the next zoom will be centered around the previous value
|
|
286
|
+
this._center = this._projection.translate();
|
|
270
287
|
this._applyZoom();
|
|
271
288
|
}
|
|
272
289
|
_applyZoom() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/topojson-map/index.ts"],"sourcesContent":["import { Selection } from 'd3-selection'\nimport { D3ZoomEvent, zoom, ZoomBehavior, zoomIdentity, ZoomTransform } from 'd3-zoom'\nimport { timeout } from 'd3-timer'\nimport { geoPath, GeoProjection, ExtendedFeatureCollection } from 'd3-geo'\nimport { color } from 'd3-color'\nimport { feature } from 'topojson-client'\n\n// Core\nimport { ComponentCore } from 'core/component'\nimport { MapGraphDataModel } from 'data-models/map-graph'\n\n// Utils\nimport { clamp, getNumber, getString, isNumber } from 'utils/data'\nimport { smartTransition } from 'utils/d3'\nimport { getColor, hexToBrightness } from 'utils/color'\nimport { getCSSVariableValue, isStringCSSVariable } from 'utils/misc'\n\n// Types\nimport { MapLink } from 'types/map'\n\n// Local Types\nimport { MapData, MapFeature, MapPointLabelPosition } from './types'\n\n// Config\nimport { TopoJSONMapDefaultConfig, TopoJSONMapConfigInterface } from './config'\n\n// Modules\nimport { arc, getLonLat } from './utils'\n\n// Styles\nimport * as s from './style'\n\nexport class TopoJSONMap<\n AreaDatum,\n PointDatum = unknown,\n LinkDatum = unknown,\n> extends ComponentCore<\n MapData<AreaDatum, PointDatum, LinkDatum>,\n TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum>\n > {\n static selectors = s\n protected _defaultConfig = TopoJSONMapDefaultConfig as TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum>\n public config: TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum> = this._defaultConfig\n\n datamodel: MapGraphDataModel<AreaDatum, PointDatum, LinkDatum> = new MapGraphDataModel()\n g: Selection<SVGGElement, unknown, null, undefined>\n private _firstRender = true\n private _isResizing = false\n private _initialScale: number = undefined\n private _center: [number, number]\n private _currentZoomLevel: number = undefined\n private _transform: ZoomTransform\n private _path = geoPath()\n private _projection: GeoProjection\n private _prevWidth: number\n private _prevHeight: number\n private _animFrameId: number\n\n private _featureCollection: GeoJSON.FeatureCollection\n private _zoomBehavior: ZoomBehavior<SVGGElement, unknown> = zoom()\n private _backgroundRect = this.g.append('rect').attr('class', s.background)\n private _featuresGroup = this.g.append('g').attr('class', s.features)\n private _linksGroup = this.g.append('g').attr('class', s.links)\n private _pointsGroup = this.g.append('g').attr('class', s.points)\n\n events = {\n [TopoJSONMap.selectors.point]: {},\n [TopoJSONMap.selectors.feature]: {},\n }\n\n constructor (config?: TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum>, data?: MapData<AreaDatum, PointDatum, LinkDatum>) {\n super()\n this._zoomBehavior.on('zoom', this._onZoom.bind(this))\n\n if (config) this.setConfig(config)\n if (data) this.setData(data)\n\n this.g.append('defs')\n .append('filter')\n .attr('id', 'heatmapFilter')\n .html(`\n <feGaussianBlur in=\"SourceGraphic\" stdDeviation=\"${this.config.heatmapModeBlurStdDeviation}\" color-interpolation-filters=\"sRGB\" result=\"blur\"></feGaussianBlur>\n <feColorMatrix class=\"blurValues\" in=\"blur\" mode=\"matrix\" values=\"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 20 -4\"></feColorMatrix>\n `)\n }\n\n setData (data: MapData<AreaDatum, PointDatum, LinkDatum>): void {\n const { config } = this\n\n this.datamodel.pointId = config.pointId\n this.datamodel.linkSource = config.linkSource\n this.datamodel.linkTarget = config.linkTarget\n this.datamodel.data = data\n }\n\n setConfig (config?: TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum>): void {\n super.setConfig(config)\n\n const newProjection = this.config.projection\n if (this._projection) {\n newProjection.scale(this._projection.scale()).translate(this._projection.translate())\n }\n this._projection = newProjection\n }\n\n _render (customDuration?: number): void {\n const { config } = this\n const duration = isNumber(customDuration) ? customDuration : config.duration\n\n this._renderBackground()\n this._renderMap(duration)\n this._renderGroups(duration)\n this._renderLinks(duration)\n this._renderPoints(duration)\n\n // When animation is running we need to temporary disable zoom behaviour\n if (duration && !config.disableZoom) {\n this.g.on('.zoom', null)\n timeout(() => {\n this.g.call(this._zoomBehavior)\n }, duration)\n }\n\n // When zoom behaviour is active we assign the `draggable` class to show the grabbing cursor\n this.g.classed('draggable', !config.disableZoom)\n this._firstRender = false\n }\n\n _renderBackground (): void {\n this._backgroundRect\n .attr('width', '100%')\n .attr('height', '100%')\n .attr('transform', `translate(${-this.bleed.left}, ${-this.bleed.top})`)\n }\n\n _renderGroups (duration: number): void {\n const transformString = this._transform.toString()\n smartTransition(this._featuresGroup, duration)\n .attr('transform', transformString)\n .attr('stroke-width', 1 / this._currentZoomLevel)\n\n smartTransition(this._linksGroup, duration)\n .attr('transform', transformString)\n\n smartTransition(this._pointsGroup, duration)\n .attr('transform', transformString)\n }\n\n _renderMap (duration: number): void {\n const { bleed, config, datamodel } = this\n\n this.g.attr('transform', `translate(${bleed.left}, ${bleed.top})`)\n const mapData: TopoJSON.Topology = config.topojson\n const featureName = config.mapFeatureName\n const featureObject = mapData?.objects?.[featureName]\n if (!featureObject) return\n\n this._featureCollection = feature(mapData, featureObject) as GeoJSON.FeatureCollection\n const featureData = (this._featureCollection?.features ?? []) as MapFeature<AreaDatum>[]\n\n if (this._firstRender) {\n // Rendering the map for the first time.\n this._projection.fitExtent([[0, 0], [this._width, this._height]], this._featureCollection)\n this._initialScale = this._projection.scale()\n this._center = this._projection.translate()\n\n if (config.mapFitToPoints) {\n this._fitToPoints()\n }\n\n const zoomExtent = config.zoomExtent\n this._zoomBehavior.scaleExtent([zoomExtent[0] * this._initialScale, zoomExtent[1] * this._initialScale])\n this.setZoom(config.zoomFactor || 1)\n\n if (!config.disableZoom) {\n this.g.call(this._zoomBehavior)\n this._applyZoom()\n }\n\n this._prevWidth = this._width\n this._prevHeight = this._height\n }\n\n if (this._prevWidth !== this._width || this._prevHeight !== this._height) {\n this._onResize()\n }\n\n this._path.projection(this._projection)\n\n // Merge passed area data and map feature data\n const areaData = datamodel.areas\n areaData.forEach(a => {\n const feature = featureData.find(f => f.id.toString() === getString(a, config.areaId).toString())\n if (feature) feature.data = a\n else if (this._firstRender) console.warn(`Can't find feature by area code ${getString(a, config.areaId)}`)\n })\n\n const features = this._featuresGroup\n .selectAll<SVGPathElement, unknown>(`.${s.feature}`)\n .data(featureData)\n\n const featuresEnter = features.enter().append('path').attr('class', s.feature)\n smartTransition(featuresEnter.merge(features), duration)\n .attr('d', this._path)\n .style('fill', (d, i) => d.data ? getColor(d.data, config.areaColor, i) : null)\n .style('cursor', d => d.data ? getString(d.data, config.areaCursor) : null)\n features.exit().remove()\n }\n\n _renderLinks (duration: number): void {\n const { config, datamodel } = this\n const links = datamodel.links\n\n const edges = this._linksGroup\n .selectAll<SVGPathElement, MapLink<PointDatum, LinkDatum>>(`.${s.link}`)\n .data(links, (d, i) => getString(d, config.linkId, i))\n\n const edgesEnter = edges.enter().append('path').attr('class', s.link)\n .style('stroke-width', 0)\n\n smartTransition(edgesEnter.merge(edges), duration)\n .attr('d', link => {\n const source = this._projection(getLonLat(link.source, config.longitude, config.latitude))\n const target = this._projection(getLonLat(link.target, config.longitude, config.latitude))\n return arc(source, target)\n })\n .style('stroke-width', link => getNumber(link, config.linkWidth) / this._currentZoomLevel)\n .style('cursor', link => getString(link, config.linkCursor))\n .style('stroke', (link, i) => getColor(link, config.linkColor, i))\n edges.exit().remove()\n }\n\n _renderPoints (duration: number): void {\n const { config, datamodel } = this\n const pointData = datamodel.points\n\n const points = this._pointsGroup\n .selectAll<SVGGElement, PointDatum>(`.${s.point}`)\n .data(pointData, (d, i) => getString(d, config.pointId, i))\n\n // Enter\n const pointsEnter = points.enter().append('g').attr('class', s.point)\n .attr('transform', d => {\n const pos = this._projection(getLonLat(d, config.longitude, config.latitude))\n return `translate(${pos[0]},${pos[1]})`\n })\n\n pointsEnter.append('circle').attr('class', s.pointCircle)\n .attr('r', 0)\n .style('fill', (d, i) => getColor(d, config.pointColor, i))\n .style('stroke-width', d => getNumber(d, config.pointStrokeWidth))\n\n pointsEnter.append('text').attr('class', s.pointLabel)\n .style('opacity', 0)\n\n // Update\n const pointsMerged = pointsEnter.merge(points)\n smartTransition(pointsMerged, duration)\n .attr('transform', d => {\n const pos = this._projection(getLonLat(d, config.longitude, config.latitude))\n return `translate(${pos[0]},${pos[1]})`\n })\n .style('cursor', d => getString(d, config.pointCursor))\n\n smartTransition(pointsMerged.select(`.${s.pointCircle}`), duration)\n .attr('r', d => getNumber(d, config.pointRadius) / this._currentZoomLevel)\n .style('fill', (d, i) => getColor(d, config.pointColor, i))\n .style('stroke', (d, i) => getColor(d, config.pointColor, i))\n .style('stroke-width', d => getNumber(d, config.pointStrokeWidth) / this._currentZoomLevel)\n\n const pointLabelsMerged = pointsMerged.select(`.${s.pointLabel}`)\n pointLabelsMerged\n .text(d => getString(d, config.pointLabel) ?? '')\n .style('font-size', d => {\n if (config.pointLabelPosition === MapPointLabelPosition.Bottom) {\n return `calc(var(--vis-map-point-label-font-size) / ${this._currentZoomLevel}`\n }\n const pointDiameter = 2 * getNumber(d, config.pointRadius)\n const pointLabelText = getString(d, config.pointLabel) || ''\n const textLength = pointLabelText.length\n const fontSize = 0.5 * pointDiameter / Math.pow(textLength, 0.4)\n return clamp(fontSize, fontSize, 16)\n })\n .attr('y', d => {\n if (config.pointLabelPosition === MapPointLabelPosition.Center) return null\n\n const pointRadius = getNumber(d, config.pointRadius) / this._currentZoomLevel\n return pointRadius\n })\n .attr('dy', config.pointLabelPosition === MapPointLabelPosition.Center ? '0.32em' : '1em')\n\n smartTransition(pointLabelsMerged, duration)\n .style('fill', (d, i) => {\n if (config.pointLabelPosition === MapPointLabelPosition.Bottom) return null\n\n const pointColor = getColor(d, config.pointColor, i)\n const hex = color(isStringCSSVariable(pointColor) ? getCSSVariableValue(pointColor, this.element) : pointColor)?.hex()\n if (!hex) return null\n\n const brightness = hexToBrightness(hex)\n return brightness > config.pointLabelTextBrightnessRatio ? 'var(--vis-map-point-label-text-color-dark)' : 'var(--vis-map-point-label-text-color-light)'\n })\n .style('opacity', 1)\n\n // Exit\n points.exit().remove()\n\n // Heatmap\n this._pointsGroup.style('filter', (config.heatmapMode && this._currentZoomLevel < config.heatmapModeZoomLevelThreshold) ? 'url(#heatmapFilter)' : null)\n this._pointsGroup.selectAll(`.${s.pointLabel}`).style('display', (config.heatmapMode && (this._currentZoomLevel < config.heatmapModeZoomLevelThreshold)) ? 'none' : null)\n }\n\n _fitToPoints (points?: PointDatum[], pad = 0.1): void {\n const { config, datamodel } = this\n const pointData = points || datamodel.points\n if (pointData.length === 0) return\n\n const featureCollection: ExtendedFeatureCollection = {\n type: 'FeatureCollection',\n features: [{\n type: 'Feature',\n properties: {},\n geometry: {\n type: 'MultiPoint',\n coordinates: pointData.map(p => {\n return [\n getNumber(p, d => getNumber(d, config.longitude)),\n getNumber(p, d => getNumber(d, config.latitude)),\n ]\n }),\n },\n }],\n }\n\n this._projection.fitExtent([\n [this._width * pad, this._height * pad],\n [this._width * (1 - pad), this._height * (1 - pad)],\n ], featureCollection)\n\n const maxScale = config.zoomExtent[1] * this._initialScale\n if (this._projection.scale() > maxScale) this._projection.scale(maxScale)\n\n this._applyZoom()\n }\n\n _applyZoom (): void {\n const translate = this._center ?? this._projection.translate()\n const scale = this._initialScale * this._currentZoomLevel\n this.g.call(this._zoomBehavior.transform, zoomIdentity.translate(translate[0], translate[1]).scale(scale))\n }\n\n _onResize (): void {\n this._isResizing = true\n const prevTranslate = this._projection.translate()\n\n this._projection.fitExtent([[0, 0], [this._width, this._height]], this._featureCollection)\n this._initialScale = this._projection.scale()\n this._center = [\n this._projection.translate()[0] * this._center[0] / prevTranslate[0],\n this._projection.translate()[1] * this._center[1] / prevTranslate[1],\n ]\n this._applyZoom()\n\n this._isResizing = false\n this._prevWidth = this._width\n this._prevHeight = this._height\n }\n\n _onZoom (event: D3ZoomEvent<any, any>): void {\n if (this._firstRender) return // To prevent double render because of binding zoom behaviour\n const isMouseEvent = event.sourceEvent !== undefined\n const isExternalEvent = !event?.sourceEvent && !this._isResizing\n\n window.cancelAnimationFrame(this._animFrameId)\n this._animFrameId = window.requestAnimationFrame(this._onZoomHandler.bind(this, event.transform, isMouseEvent, isExternalEvent))\n\n if (isMouseEvent) {\n // Update the center coordinate so that the next call to _applyZoom()\n // will zoom with respect to the current view\n this._center = [event.transform.x, event.transform.y]\n }\n this._currentZoomLevel = (event?.transform.k / this._initialScale) || 1\n }\n\n _onZoomHandler (transform: ZoomTransform, isMouseEvent: boolean, isExternalEvent: boolean): void {\n const scale = transform.k / this._initialScale || 1\n const center = this._projection.translate()\n\n this._transform = zoomIdentity\n .translate(transform.x - center[0] * scale, transform.y - center[1] * scale)\n .scale(scale)\n\n const customDuration = isExternalEvent\n ? this.config.zoomDuration\n : (isMouseEvent ? 0 : null)\n\n // Call render functions that depend on this._transform\n this._renderGroups(customDuration)\n this._renderLinks(customDuration)\n this._renderPoints(customDuration)\n }\n\n public zoomIn (increment = 0.5): void {\n this.setZoom(this._currentZoomLevel + increment)\n }\n\n public zoomOut (increment = 0.5): void {\n this.setZoom(this._currentZoomLevel - increment)\n }\n\n public setZoom (zoomLevel: number): void {\n const { config } = this\n this._currentZoomLevel = clamp(zoomLevel, config.zoomExtent[0], config.zoomExtent[1])\n this._transform = zoomIdentity\n .translate(this._center[0] * (1 - this._currentZoomLevel), this._center[1] * (1 - this._currentZoomLevel))\n .scale(this._currentZoomLevel)\n // We are using this._applyZoom() instead of directly calling this._render(config.zoomDuration) because\n // we've to \"attach\" new transform to the map group element. Otherwise zoomBehavior will not know\n // that the zoom state has changed\n this._applyZoom()\n }\n\n public fitView (): void {\n this._projection.fitExtent([[0, 0], [this._width, this._height]], this._featureCollection)\n this._currentZoomLevel = (this._projection?.scale() / this._initialScale) || 1\n this._center = this._projection.translate()\n // We are using this._applyZoom() instead of directly calling this._render(config.zoomDuration) because\n // we've to \"attach\" new transform to the map group element. Otherwise zoomBehavior will not know\n // that the zoom state has changed\n this._applyZoom()\n }\n\n destroy (): void {\n window.cancelAnimationFrame(this._animFrameId)\n }\n}\n"],"names":["s.background","s.features","s.links","s.points","s.feature","s.link","s.point","s.pointCircle","s.pointLabel","s"],"mappings":";;;;;;;;;;;;;;;;;AAgCM,MAAO,WAIX,SAAQ,aAGP,CAAA;IA+BD,WAAa,CAAA,MAAqE,EAAE,IAAgD,EAAA;AAClI,QAAA,KAAK,EAAE,CAAA;QA9BC,IAAc,CAAA,cAAA,GAAG,wBAAwF,CAAA;AAC5G,QAAA,IAAA,CAAA,MAAM,GAAiE,IAAI,CAAC,cAAc,CAAA;AAEjG,QAAA,IAAA,CAAA,SAAS,GAAwD,IAAI,iBAAiB,EAAE,CAAA;QAEhF,IAAY,CAAA,YAAA,GAAG,IAAI,CA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AC,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAA;AAC1F,QAAA,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAA,CAAA,EAAA,GAAA,IAAI,CAAC,WAAW,0CAAE,KAAK,EAAE,IAAG,IAAI,CAAC,aAAa,KAAK,CAAC,CAAA;QAC9E,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAA;;;;QAI3C,IAAI,CAAC,UAAU,EAAE,CAAA;KAClB;IAED,OAAO,GAAA;AACL,QAAA,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;KAC/C;;AA1YM,WAAS,CAAA,SAAA,GAAGC,KAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/topojson-map/index.ts"],"sourcesContent":["import { Selection } from 'd3-selection'\nimport { D3ZoomEvent, zoom, ZoomBehavior, zoomIdentity, ZoomTransform } from 'd3-zoom'\nimport { timeout } from 'd3-timer'\nimport { geoPath, GeoProjection, ExtendedFeatureCollection } from 'd3-geo'\nimport { color } from 'd3-color'\nimport { feature } from 'topojson-client'\n\n// Core\nimport { ComponentCore } from 'core/component'\nimport { MapGraphDataModel } from 'data-models/map-graph'\n\n// Utils\nimport { clamp, getNumber, getString, isNumber } from 'utils/data'\nimport { smartTransition } from 'utils/d3'\nimport { getColor, hexToBrightness } from 'utils/color'\nimport { getCSSVariableValue, isStringCSSVariable } from 'utils/misc'\n\n// Types\nimport { MapLink } from 'types/map'\n\n// Local Types\nimport { MapData, MapFeature, MapPointLabelPosition, MapProjection } from './types'\n\n// Config\nimport { TopoJSONMapDefaultConfig, TopoJSONMapConfigInterface } from './config'\n\n// Modules\nimport { arc, getLonLat } from './utils'\n\n// Styles\nimport * as s from './style'\n\nexport class TopoJSONMap<\n AreaDatum,\n PointDatum = unknown,\n LinkDatum = unknown,\n> extends ComponentCore<\n MapData<AreaDatum, PointDatum, LinkDatum>,\n TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum>\n > {\n static selectors = s\n protected _defaultConfig = TopoJSONMapDefaultConfig as TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum>\n public config: TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum> = this._defaultConfig\n\n datamodel: MapGraphDataModel<AreaDatum, PointDatum, LinkDatum> = new MapGraphDataModel()\n g: Selection<SVGGElement, unknown, null, undefined>\n private _firstRender = true\n private _isResizing = false\n private _initialScale: number = undefined\n private _center: [number, number]\n private _currentZoomLevel: number = undefined\n private _transform: ZoomTransform\n private _path = geoPath()\n private _projection: GeoProjection\n private _prevWidth: number\n private _prevHeight: number\n private _animFrameId: number\n\n private _featureCollection: GeoJSON.FeatureCollection\n private _zoomBehavior: ZoomBehavior<SVGGElement, unknown> = zoom()\n private _backgroundRect = this.g.append('rect').attr('class', s.background)\n private _featuresGroup = this.g.append('g').attr('class', s.features)\n private _linksGroup = this.g.append('g').attr('class', s.links)\n private _pointsGroup = this.g.append('g').attr('class', s.points)\n\n events = {\n [TopoJSONMap.selectors.point]: {},\n [TopoJSONMap.selectors.feature]: {},\n }\n\n constructor (config?: TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum>, data?: MapData<AreaDatum, PointDatum, LinkDatum>) {\n super()\n this._zoomBehavior.on('zoom', this._onZoom.bind(this))\n\n if (config) this.setConfig(config)\n if (data) this.setData(data)\n\n this.g.append('defs')\n .append('filter')\n .attr('id', 'heatmapFilter')\n .html(`\n <feGaussianBlur in=\"SourceGraphic\" stdDeviation=\"${this.config.heatmapModeBlurStdDeviation}\" color-interpolation-filters=\"sRGB\" result=\"blur\"></feGaussianBlur>\n <feColorMatrix class=\"blurValues\" in=\"blur\" mode=\"matrix\" values=\"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 20 -4\"></feColorMatrix>\n `)\n }\n\n setData (data: MapData<AreaDatum, PointDatum, LinkDatum>): void {\n const { config } = this\n\n this.datamodel.pointId = config.pointId\n this.datamodel.linkSource = config.linkSource\n this.datamodel.linkTarget = config.linkTarget\n this.datamodel.data = data\n\n // If there was a data change and mapFitToPoints is enabled, we will need to re-fit the map\n this._firstRender = this._firstRender || config.mapFitToPoints\n }\n\n setConfig (config?: TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum>): void {\n super.setConfig(config)\n\n // Setting the default here instead of defaultConfig to prevent mutation from other TopoJSONMap instances\n const newProjection = this.config.projection ?? MapProjection.Kavrayskiy7()\n if (this._projection) {\n newProjection.scale(this._projection.scale()).translate(this._projection.translate())\n }\n this._projection = newProjection\n }\n\n _render (customDuration?: number): void {\n const { config } = this\n const duration = isNumber(customDuration) ? customDuration : config.duration\n\n this._renderBackground()\n this._renderMap(duration)\n this._renderGroups(duration)\n this._renderLinks(duration)\n this._renderPoints(duration)\n\n // When animation is running we need to temporary disable zoom behaviour\n if (duration && !config.disableZoom) {\n this.g.on('.zoom', null)\n timeout(() => {\n this.g.call(this._zoomBehavior)\n }, duration)\n }\n\n // When zoom behaviour is active we assign the `draggable` class to show the grabbing cursor\n this.g.classed('draggable', !config.disableZoom)\n this._firstRender = false\n }\n\n _renderBackground (): void {\n this._backgroundRect\n .attr('width', '100%')\n .attr('height', '100%')\n .attr('transform', `translate(${-this.bleed.left}, ${-this.bleed.top})`)\n }\n\n _renderGroups (duration: number): void {\n const transformString = this._transform.toString()\n smartTransition(this._featuresGroup, duration)\n .attr('transform', transformString)\n .attr('stroke-width', 1 / this._currentZoomLevel)\n\n smartTransition(this._linksGroup, duration)\n .attr('transform', transformString)\n\n smartTransition(this._pointsGroup, duration)\n .attr('transform', transformString)\n }\n\n _renderMap (duration: number): void {\n const { bleed, config, datamodel } = this\n\n this.g.attr('transform', `translate(${bleed.left}, ${bleed.top})`)\n const mapData: TopoJSON.Topology = config.topojson\n const featureName = config.mapFeatureName\n const featureObject = mapData?.objects?.[featureName]\n if (!featureObject) return\n\n this._featureCollection = feature(mapData, featureObject) as GeoJSON.FeatureCollection\n const featureData = (this._featureCollection?.features ?? []) as MapFeature<AreaDatum>[]\n\n if (this._firstRender) {\n // Rendering the map for the first time.\n this._projection.fitExtent([[0, 0], [this._width, this._height]], this._featureCollection)\n this._initialScale = this._projection.scale()\n this._center = this._projection.translate()\n\n if (config.mapFitToPoints) {\n this._fitToPoints()\n }\n\n const zoomExtent = config.zoomExtent\n this._zoomBehavior.scaleExtent([zoomExtent[0] * this._initialScale, zoomExtent[1] * this._initialScale])\n this.setZoom(config.zoomFactor || 1)\n\n if (!config.disableZoom) {\n this.g.call(this._zoomBehavior)\n this._applyZoom()\n }\n\n this._prevWidth = this._width\n this._prevHeight = this._height\n }\n\n if (this._prevWidth !== this._width || this._prevHeight !== this._height) {\n this._onResize()\n }\n\n\n this._path.projection(this._projection)\n\n // Merge passed area data and map feature data\n const areaData = datamodel.areas\n areaData.forEach(a => {\n const feature = featureData.find(f => f.id.toString() === getString(a, config.areaId).toString())\n if (feature) feature.data = a\n else if (this._firstRender) console.warn(`Can't find feature by area code ${getString(a, config.areaId)}`)\n })\n\n const features = this._featuresGroup\n .selectAll<SVGPathElement, unknown>(`.${s.feature}`)\n .data(featureData)\n\n const featuresEnter = features.enter().append('path').attr('class', s.feature)\n smartTransition(featuresEnter.merge(features), duration)\n .attr('d', this._path)\n .style('fill', (d, i) => d.data ? getColor(d.data, config.areaColor, i) : null)\n .style('cursor', d => d.data ? getString(d.data, config.areaCursor) : null)\n features.exit().remove()\n }\n\n _renderLinks (duration: number): void {\n const { config, datamodel } = this\n const links = datamodel.links\n\n const edges = this._linksGroup\n .selectAll<SVGPathElement, MapLink<PointDatum, LinkDatum>>(`.${s.link}`)\n .data(links, (d, i) => getString(d, config.linkId, i))\n\n const edgesEnter = edges.enter().append('path').attr('class', s.link)\n .style('stroke-width', 0)\n\n smartTransition(edgesEnter.merge(edges), duration)\n .attr('d', link => {\n const source = this._projection(getLonLat(link.source, config.longitude, config.latitude))\n const target = this._projection(getLonLat(link.target, config.longitude, config.latitude))\n return arc(source, target)\n })\n .style('stroke-width', link => getNumber(link, config.linkWidth) / this._currentZoomLevel)\n .style('cursor', link => getString(link, config.linkCursor))\n .style('stroke', (link, i) => getColor(link, config.linkColor, i))\n edges.exit().remove()\n }\n\n _renderPoints (duration: number): void {\n const { config, datamodel } = this\n const pointData = datamodel.points\n\n const points = this._pointsGroup\n .selectAll<SVGGElement, PointDatum>(`.${s.point}`)\n .data(pointData, (d, i) => getString(d, config.pointId, i))\n\n // Enter\n const pointsEnter = points.enter().append('g').attr('class', s.point)\n .attr('transform', d => {\n const pos = this._projection(getLonLat(d, config.longitude, config.latitude))\n return `translate(${pos[0]},${pos[1]})`\n })\n .style('opacity', 0)\n\n pointsEnter.append('circle').attr('class', s.pointCircle)\n .attr('r', 0)\n .style('fill', (d, i) => getColor(d, config.pointColor, i))\n .style('stroke-width', d => getNumber(d, config.pointStrokeWidth))\n\n pointsEnter.append('text').attr('class', s.pointLabel)\n .style('opacity', 0)\n\n // Update\n const pointsMerged = pointsEnter.merge(points)\n smartTransition(pointsMerged, duration)\n .attr('transform', d => {\n const pos = this._projection(getLonLat(d, config.longitude, config.latitude))\n return `translate(${pos[0]},${pos[1]})`\n })\n .style('cursor', d => getString(d, config.pointCursor))\n .style('opacity', 1)\n\n smartTransition(pointsMerged.select(`.${s.pointCircle}`), duration)\n .attr('r', d => getNumber(d, config.pointRadius) / this._currentZoomLevel)\n .style('fill', (d, i) => getColor(d, config.pointColor, i))\n .style('stroke', (d, i) => getColor(d, config.pointColor, i))\n .style('stroke-width', d => getNumber(d, config.pointStrokeWidth) / this._currentZoomLevel)\n\n const pointLabelsMerged = pointsMerged.select(`.${s.pointLabel}`)\n pointLabelsMerged\n .text(d => getString(d, config.pointLabel) ?? '')\n .style('font-size', d => {\n if (config.pointLabelPosition === MapPointLabelPosition.Bottom) {\n return `calc(var(--vis-map-point-label-font-size) / ${this._currentZoomLevel}`\n }\n const pointDiameter = 2 * getNumber(d, config.pointRadius)\n const pointLabelText = getString(d, config.pointLabel) || ''\n const textLength = pointLabelText.length\n const fontSize = 0.5 * pointDiameter / Math.pow(textLength, 0.4)\n return clamp(fontSize, fontSize, 16)\n })\n .attr('y', d => {\n if (config.pointLabelPosition === MapPointLabelPosition.Center) return null\n\n const pointRadius = getNumber(d, config.pointRadius) / this._currentZoomLevel\n return pointRadius\n })\n .attr('dy', config.pointLabelPosition === MapPointLabelPosition.Center ? '0.32em' : '1em')\n\n smartTransition(pointLabelsMerged, duration)\n .style('fill', (d, i) => {\n if (config.pointLabelPosition === MapPointLabelPosition.Bottom) return null\n\n const pointColor = getColor(d, config.pointColor, i)\n const hex = color(isStringCSSVariable(pointColor) ? getCSSVariableValue(pointColor, this.element) : pointColor)?.hex()\n if (!hex) return null\n\n const brightness = hexToBrightness(hex)\n return brightness > config.pointLabelTextBrightnessRatio ? 'var(--vis-map-point-label-text-color-dark)' : 'var(--vis-map-point-label-text-color-light)'\n })\n .style('opacity', 1)\n\n // Exit\n points.exit().remove()\n\n // Heatmap\n this._pointsGroup.style('filter', (config.heatmapMode && this._currentZoomLevel < config.heatmapModeZoomLevelThreshold) ? 'url(#heatmapFilter)' : null)\n this._pointsGroup.selectAll(`.${s.pointLabel}`).style('display', (config.heatmapMode && (this._currentZoomLevel < config.heatmapModeZoomLevelThreshold)) ? 'none' : null)\n }\n\n _fitToPoints (points?: PointDatum[], pad = 0.1): void {\n const { config, datamodel } = this\n const pointData = points || datamodel.points\n if (pointData.length === 0) return\n\n this.fitView()\n\n const featureCollection: ExtendedFeatureCollection = {\n type: 'FeatureCollection',\n features: [{\n type: 'Feature',\n properties: {},\n geometry: {\n type: 'MultiPoint',\n coordinates: pointData.map(p => {\n return [\n getNumber(p, d => getNumber(d, config.longitude)),\n getNumber(p, d => getNumber(d, config.latitude)),\n ]\n }),\n },\n }],\n }\n\n this._projection.fitExtent([\n [this._width * pad, this._height * pad],\n [this._width * (1 - pad), this._height * (1 - pad)],\n ], featureCollection)\n\n const maxScale = config.zoomExtent[1] * this._initialScale\n const fittedScale = this._projection.scale()\n\n if (fittedScale > maxScale) {\n const fittedTranslate = this._projection.translate()\n const scaleRatio = maxScale / fittedScale\n\n this._projection.scale(maxScale)\n this._projection.translate([\n this._width / 2 - (this._width / 2 - fittedTranslate[0]) * scaleRatio,\n this._height / 2 - (this._height / 2 - fittedTranslate[1]) * scaleRatio,\n ])\n }\n\n // If we don't update the center, the next zoom will be centered around the previous value\n this._center = this._projection.translate()\n this._applyZoom()\n }\n\n _applyZoom (): void {\n const translate = this._center ?? this._projection.translate()\n const scale = this._initialScale * this._currentZoomLevel\n this.g.call(this._zoomBehavior.transform, zoomIdentity.translate(translate[0], translate[1]).scale(scale))\n }\n\n _onResize (): void {\n this._isResizing = true\n const prevTranslate = this._projection.translate()\n\n this._projection.fitExtent([[0, 0], [this._width, this._height]], this._featureCollection)\n this._initialScale = this._projection.scale()\n this._center = [\n this._projection.translate()[0] * this._center[0] / prevTranslate[0],\n this._projection.translate()[1] * this._center[1] / prevTranslate[1],\n ]\n this._applyZoom()\n\n this._isResizing = false\n this._prevWidth = this._width\n this._prevHeight = this._height\n }\n\n _onZoom (event: D3ZoomEvent<any, any>): void {\n if (this._firstRender) return // To prevent double render because of binding zoom behaviour\n const isMouseEvent = event.sourceEvent !== undefined\n const isExternalEvent = !event?.sourceEvent && !this._isResizing\n\n window.cancelAnimationFrame(this._animFrameId)\n this._animFrameId = window.requestAnimationFrame(this._onZoomHandler.bind(this, event.transform, isMouseEvent, isExternalEvent))\n\n if (isMouseEvent) {\n // Update the center coordinate so that the next call to _applyZoom()\n // will zoom with respect to the current view\n this._center = [event.transform.x, event.transform.y]\n }\n this._currentZoomLevel = (event?.transform.k / this._initialScale) || 1\n }\n\n _onZoomHandler (transform: ZoomTransform, isMouseEvent: boolean, isExternalEvent: boolean): void {\n const scale = transform.k / this._initialScale || 1\n const center = this._projection.translate()\n\n this._transform = zoomIdentity\n .translate(transform.x - center[0] * scale, transform.y - center[1] * scale)\n .scale(scale)\n\n const customDuration = isExternalEvent\n ? this.config.zoomDuration\n : (isMouseEvent ? 0 : null)\n\n // Call render functions that depend on this._transform\n this._renderGroups(customDuration)\n this._renderLinks(customDuration)\n this._renderPoints(customDuration)\n }\n\n public zoomIn (increment = 0.5): void {\n this.setZoom(this._currentZoomLevel + increment)\n }\n\n public zoomOut (increment = 0.5): void {\n this.setZoom(this._currentZoomLevel - increment)\n }\n\n public setZoom (zoomLevel: number): void {\n const { config } = this\n this._currentZoomLevel = clamp(zoomLevel, config.zoomExtent[0], config.zoomExtent[1])\n this._transform = zoomIdentity\n .translate(this._center[0] * (1 - this._currentZoomLevel), this._center[1] * (1 - this._currentZoomLevel))\n .scale(this._currentZoomLevel)\n // We are using this._applyZoom() instead of directly calling this._render(config.zoomDuration) because\n // we've to \"attach\" new transform to the map group element. Otherwise zoomBehavior will not know\n // that the zoom state has changed\n this._applyZoom()\n }\n\n public fitView (): void {\n this._projection.fitExtent([[0, 0], [this._width, this._height]], this._featureCollection)\n this._currentZoomLevel = (this._projection?.scale() / this._initialScale) || 1\n this._center = this._projection.translate()\n // We are using this._applyZoom() instead of directly calling this._render(config.zoomDuration) because\n // we've to \"attach\" new transform to the map group element. Otherwise zoomBehavior will not know\n // that the zoom state has changed\n this._applyZoom()\n }\n\n destroy (): void {\n window.cancelAnimationFrame(this._animFrameId)\n }\n}\n"],"names":["s.background","s.features","s.links","s.points","s.feature","s.link","s.point","s.pointCircle","s.pointLabel","s"],"mappings":";;;;;;;;;;;;;;;;;AAgCM,MAAO,WAIX,SAAQ,aAGP,CAAA;IA+BD,WAAa,CAAA,MAAqE,EAAE,IAAgD,EAAA;AAClI,QAAA,KAAK,EAAE,CAAA;QA9BC,IAAc,CAAA,cAAA,GAAG,wBAAwF,CAAA;AAC5G,QAAA,IAAA,CAAA,MAAM,GAAiE,IAAI,CAAC,cAAc,CAAA;AAEjG,QAAA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C,aAAa,KAAK,CAAC,CAAA;QAC9E,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAA;;;;QAI3C,IAAI,CAAC,UAAU,EAAE,CAAA;KAClB;IAED,OAAO,GAAA;AACL,QAAA,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;KAC/C;;AAhaM,WAAS,CAAA,SAAA,GAAGC,KAAC;;;;"}
|
|
@@ -268,6 +268,7 @@ class XYContainer extends ContainerCore {
|
|
|
268
268
|
if (isYDirectionSouth)
|
|
269
269
|
yRange.reverse();
|
|
270
270
|
for (const c of components) {
|
|
271
|
+
c.setSize(this.width, this.height, this.containerWidth, this.containerHeight);
|
|
271
272
|
c.setScaleRange(ScaleDimension.X, (_e = config.xRange) !== null && _e !== void 0 ? _e : xRange);
|
|
272
273
|
c.setScaleRange(ScaleDimension.Y, (_f = config.yRange) !== null && _f !== void 0 ? _f : yRange);
|
|
273
274
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/containers/xy-container/index.ts"],"sourcesContent":["import { css } from '@emotion/css'\nimport { extent, merge as mergeArrays } from 'd3-array'\nimport { Selection } from 'd3-selection'\n\n// Global CSS variables (side effects import)\nimport 'styles/index'\n\n// Core\nimport { ContainerCore } from 'core/container'\nimport { XYComponentCore } from 'core/xy-component'\nimport { XYComponentConfigInterface } from 'core/xy-component/config'\n\n// Data Model\nimport { CoreDataModel } from 'data-models/core'\n\n// Types\nimport { Spacing } from 'types/spacing'\nimport { AxisType } from 'components/axis/types'\nimport { ScaleDimension } from 'types/scale'\nimport { Direction } from 'types/direction'\n\n// Utils\nimport { clamp, clean, flatten } from 'utils/data'\nimport { guid } from 'utils/misc'\n\n// Config\nimport { XYContainerDefaultConfig, XYContainerConfigInterface } from './config'\nimport {\n AreaConfigInterface,\n BrushConfigInterface,\n LineConfigInterface,\n ScatterConfigInterface,\n StackedBarConfigInterface,\n TimelineConfigInterface,\n} from '../../components'\n\nexport type XYConfigInterface<Datum> = XYComponentConfigInterface<Datum>\n| StackedBarConfigInterface<Datum>\n| LineConfigInterface<Datum>\n| ScatterConfigInterface<Datum>\n| BrushConfigInterface<Datum>\n| TimelineConfigInterface<Datum>\n| AreaConfigInterface<Datum>\n\nexport class XYContainer<Datum> extends ContainerCore {\n protected _defaultConfig = XYContainerDefaultConfig as XYContainerConfigInterface<Datum>\n protected _svgDefs: Selection<SVGDefsElement, unknown, null, undefined>\n public datamodel: CoreDataModel<Datum[]> = new CoreDataModel()\n public config: XYContainerConfigInterface<Datum> = this._defaultConfig\n private _clipPath: Selection<SVGClipPathElement, unknown, null, undefined>\n private _clipPathId = guid()\n private _axisMargin: Spacing = { top: 0, bottom: 0, left: 0, right: 0 }\n private _firstRender = true\n\n constructor (element: HTMLElement, config?: XYContainerConfigInterface<Datum>, data?: Datum[]) {\n super(element)\n\n this._clipPath = this.svg.append('clipPath')\n .attr('id', this._clipPathId)\n this._clipPath.append('rect')\n\n // When the base tag is specified on the HTML head,\n // Safari fails to find the corresponding filter URL.\n // We have to provide tull url in order to fix that\n const highlightFilterId = 'saturate'\n const baseUrl = window.location.href.replace(window.location.hash, '')\n this.svg.attr('class', css`\n --highlight-filter-id: url(${baseUrl}#${highlightFilterId}); // defining a css variable\n `)\n\n this._svgDefs.append('filter')\n .attr('id', highlightFilterId)\n .attr('filterUnits', 'objectBoundingBox')\n .html('<feColorMatrix type=\"saturate\" in=\"SourceGraphic\" values=\"1.35\"/>')\n\n if (config) {\n this.updateContainer(config, true)\n }\n\n if (data) {\n this.setData(data, true)\n }\n\n // Render if there are axes or components with data\n if (\n this.config.xAxis ||\n this.config.yAxis ||\n this.components?.some(c => c.datamodel.data)\n ) {\n this.render()\n }\n\n // Force re-render axes when fonts are loaded\n (document as any).fonts?.ready.then(() => {\n if (!this._firstRender) this._renderAxes(0)\n })\n }\n\n get components (): XYComponentCore<Datum>[] {\n return this.config.components\n }\n\n // Overriding ContainerCore default get width method to work with axis auto margin\n get width (): number {\n const margin = this._getMargin()\n return clamp(this.containerWidth - margin.left - margin.right, 0, Number.POSITIVE_INFINITY)\n }\n\n // Overriding ContainerCore default get height method to work with axis auto margin\n get height (): number {\n const margin = this._getMargin()\n\n return clamp(this.containerHeight - margin.top - margin.bottom, 0, Number.POSITIVE_INFINITY)\n }\n\n public setData (data: Datum[], preventRender?: boolean): void {\n const { components, config } = this\n if (!data) return\n this.datamodel.data = data\n\n components.forEach((c) => {\n c.setData(data)\n })\n\n config.crosshair?.setData(data)\n config.xAxis?.setData(data)\n config.yAxis?.setData(data)\n config.tooltip?.hide()\n if (!preventRender) this.render()\n }\n\n public updateContainer (containerConfig: XYContainerConfigInterface<Datum>, preventRender?: boolean): void {\n super.updateContainer(containerConfig)\n this._removeAllChildren()\n\n // If there were any new components added we need to pass them data\n this.setData(this.datamodel.data, true)\n\n // Set up the axes\n if (containerConfig.xAxis) {\n this.config.xAxis.config.type = AxisType.X\n this.element.appendChild(containerConfig.xAxis.element)\n }\n if (containerConfig.yAxis) {\n this.config.yAxis.config.type = AxisType.Y\n this.element.appendChild(containerConfig.yAxis.element)\n }\n\n // Re-insert elements to the DOM\n for (const c of this.components) {\n this.element.appendChild(c.element)\n }\n\n // Set up the tooltip\n const tooltip = containerConfig.tooltip\n if (tooltip) {\n if (!tooltip.hasContainer()) tooltip.setContainer(this._container)\n tooltip.setComponents(this.components)\n }\n\n // Set up the crosshair\n const crosshair = containerConfig.crosshair\n if (crosshair) {\n crosshair.setContainer(this.svg)\n crosshair.tooltip = tooltip\n\n this.element.appendChild(crosshair.element)\n }\n\n // Set up annotations\n const annotations = containerConfig.annotations\n if (annotations) {\n this.element.appendChild(annotations.element)\n }\n\n // Clipping path\n this.element.appendChild(this._clipPath.node())\n\n // Defs\n this.element.appendChild(this._svgDefs.node())\n this.element.appendChild(this._svgDefsExternal.node())\n\n // Rendering\n if (!preventRender) this.render()\n }\n\n public updateComponents (componentConfigs: XYConfigInterface<Datum>[], preventRender?: boolean): void {\n const { config } = this\n\n this.components.forEach((c, i) => {\n const componentConfig = componentConfigs[i]\n if (componentConfig) {\n c.setConfig(componentConfigs[i])\n }\n })\n\n this._updateScales(...this.components, config.xAxis, config.yAxis, config.crosshair)\n if (!preventRender) this.render()\n }\n\n public update (containerConfig: XYContainerConfigInterface<Datum>, componentConfigs?: XYComponentConfigInterface<Datum>[], data?: Datum[]): void {\n if (data) this.datamodel.data = data // Just updating the data model because the `updateContainer` method has the `setData` step inside\n if (containerConfig) this.updateContainer(containerConfig, true)\n if (componentConfigs) this.updateComponents(componentConfigs, true)\n this.render()\n }\n\n protected _preRender (): void {\n const { config } = this\n super._preRender()\n\n // Calculate extra margin required to fit the axes\n if (config.autoMargin) {\n this._setAutoMargin()\n }\n\n // Pass size to the components\n const components = clean([...this.components, config.xAxis, config.yAxis, config.crosshair, config.annotations])\n for (const c of components) {\n c.setSize(this.width, this.height, this.containerWidth, this.containerHeight)\n }\n\n // Update Scales of all the components at once to calculate required paddings and sync them\n this._updateScales(...this.components, config.xAxis, config.yAxis, config.crosshair)\n }\n\n protected _render (customDuration?: number): void {\n const { config } = this\n super._render()\n\n // Get chart total margin after auto margin calculations\n const margin = this._getMargin()\n\n // Render components\n for (const c of this.components) {\n c.g.attr('transform', `translate(${margin.left},${margin.top})`)\n .style('clip-path', c.clippable ? `url(#${this._clipPathId})` : null)\n .style('-webkit-clip-path', c.clippable ? `url(#${this._clipPathId})` : null)\n\n c.render(customDuration)\n }\n\n this._renderAxes(this._firstRender ? 0 : customDuration)\n\n // Clip RectsetSize\n // Extending the clipping path to allow small overflow (e.g. Line will looks better that way when it touches the edges)\n const clipPathExtension = 2\n this._clipPath.select('rect')\n .attr('x', -clipPathExtension)\n .attr('y', -clipPathExtension)\n .attr('width', this.width + 2 * clipPathExtension)\n .attr('height', this.height + 2 * clipPathExtension)\n\n // Tooltip\n config.tooltip?.update() // Re-bind events\n\n // Crosshair\n const crosshair = config.crosshair\n if (crosshair) {\n // Pass accessors\n const yAccessors = this.components.filter(c => !c.stacked).map(c => c.config.y)\n const yStackedAccessors = this.components.filter(c => c.stacked).map(c => c.config.y)\n const baselineComponentConfig = this.components.find(c => (c.config as AreaConfigInterface<Datum>).baseline)?.config as AreaConfigInterface<Datum>\n const baselineAccessor = baselineComponentConfig?.baseline\n\n crosshair.accessors = {\n x: this.components[0]?.config.x,\n y: flatten(yAccessors),\n yStacked: flatten(yStackedAccessors),\n baseline: baselineAccessor,\n }\n\n crosshair.g.attr('transform', `translate(${margin.left},${margin.top})`)\n .style('clip-path', `url(#${this._clipPathId})`)\n .style('-webkit-clip-path', `url(#${this._clipPathId})`)\n crosshair.hide()\n }\n\n config.annotations?.g.attr('transform', `translate(${margin.left},${margin.top})`)\n config.annotations?.render()\n\n this._firstRender = false\n }\n\n private _updateScales<T extends XYComponentCore<Datum>> (...components: T[]): void {\n const c = clean(components || this.components)\n this._setScales(...c)\n this._updateScalesDomain(...c)\n this._updateScalesRange(...c)\n }\n\n private _setScales<T extends XYComponentCore<Datum>> (...components: T[]): void {\n const { config } = this\n if (!components) return\n\n // Set the X and Y scales\n if (config.xScale) components.forEach(c => c.setScale(ScaleDimension.X, config.xScale))\n if (config.yScale) components.forEach(c => c.setScale(ScaleDimension.Y, config.yScale))\n }\n\n private _updateScalesDomain<T extends XYComponentCore<Datum>> (...components: T[]): void {\n const { config } = this\n if (!components) return\n\n const componentsWithDomain = components.filter(c => !c.config.excludeFromDomainCalculation)\n\n // Loop over all the dimensions\n Object.values(ScaleDimension).forEach((dimension: ScaleDimension) => {\n const [min, max] = extent(\n mergeArrays(\n componentsWithDomain.map(c => c.getDataExtent(dimension, config.scaleByDomain))\n ) as number[]\n ) // Components with undefined dimension accessors will return [undefined, undefined] but d3.extent will take care of that\n\n const configuredDomain = dimension === ScaleDimension.Y ? config.yDomain : config.xDomain\n const configuredDomainMinConstraint = dimension === ScaleDimension.Y ? config.yDomainMinConstraint : config.xDomainMinConstraint\n const configuredDomainMaxConstraint = dimension === ScaleDimension.Y ? config.yDomainMaxConstraint : config.xDomainMaxConstraint\n const domainMin = configuredDomain?.[0] ?? min ?? 0\n const domainMax = configuredDomain?.[1] ?? max ?? 1\n const domain = [\n clamp(domainMin, configuredDomainMinConstraint?.[0] ?? Number.NEGATIVE_INFINITY, configuredDomainMinConstraint?.[1] ?? Number.POSITIVE_INFINITY),\n clamp(domainMax, configuredDomainMaxConstraint?.[0] ?? Number.NEGATIVE_INFINITY, configuredDomainMaxConstraint?.[1] ?? Number.POSITIVE_INFINITY),\n ]\n\n // Extend the X and Y domains if they're empty and `preventEmptyDomain` was explicitly set to `true`\n // or just the X domain if there is no data provided and `preventEmptyDomain` set to `null`\n if (domain[0] === domain[1]) {\n const hasDataProvided = componentsWithDomain.some(c => c.datamodel.data?.length > 0)\n if (config.preventEmptyDomain || (config.preventEmptyDomain === null && (!hasDataProvided || dimension === ScaleDimension.Y))) {\n domain[1] = domain[0] + 1\n }\n }\n\n components.forEach(c => c.setScaleDomain(dimension, domain))\n })\n }\n\n private _updateScalesRange<T extends XYComponentCore<Datum>> (...components: T[]): void {\n const { config } = this\n if (!components) return\n\n // Set initial scale range\n const isYDirectionSouth = config.yDirection === Direction.South\n const xRange: [number, number] = [config.padding.left ?? 0, this.width - config.padding.right ?? 0]\n const yRange: [number, number] = [this.height - config.padding.bottom ?? 0, config.padding.top ?? 0]\n if (isYDirectionSouth) yRange.reverse()\n\n for (const c of components) {\n c.setScaleRange(ScaleDimension.X, config.xRange ?? xRange)\n c.setScaleRange(ScaleDimension.Y, config.yRange ?? yRange)\n }\n\n // Get and combine bleed\n const bleed = components.map(c => c.bleed).reduce((bleed, b) => {\n for (const key of Object.keys(bleed)) {\n const k = key as keyof Spacing\n if (bleed[k] < b[k]) bleed[k] = b[k]\n }\n return bleed\n }, { top: 0, bottom: 0, left: 0, right: 0 })\n\n // Update scale range\n for (const c of components) {\n c.setScaleRange(ScaleDimension.X, [xRange[0] + bleed.left, xRange[1] - bleed.right])\n c.setScaleRange(\n ScaleDimension.Y,\n isYDirectionSouth\n ? [yRange[0] + bleed.top, yRange[1] - bleed.bottom] // if Y axis is directed downwards\n : [yRange[0] - bleed.bottom, yRange[1] + bleed.top] // if Y axis is directed upwards\n )\n }\n }\n\n private _renderAxes (duration: number): void {\n const { config: { xAxis, yAxis } } = this\n const margin = this._getMargin()\n\n const axes = clean([xAxis, yAxis])\n axes.forEach(axis => {\n const offset = axis.getOffset(margin)\n axis.g.attr('transform', `translate(${offset.left},${offset.top})`)\n axis.render(duration)\n })\n }\n\n private _setAutoMargin (): void {\n const { config: { xAxis, yAxis } } = this\n\n // At first we need to set the domain to the scales\n const components = clean([...this.components, xAxis, yAxis])\n this._updateScalesDomain(...components)\n\n // Calculate margin required by the axes\n // We do two iterations on the first render, because the amount and size of ticks can change\n // after new margin are calculated and applied (axes dimensions will change).\n // That's needed for correct label placement.\n const numIterations = this._firstRender ? 2 : 1\n for (let i = 0; i < numIterations; i += 1) {\n const axisMargin: Spacing = { top: 0, bottom: 0, left: 0, right: 0 }\n this._updateScalesRange(...components)\n const axes = clean([xAxis, yAxis])\n axes.forEach(axis => {\n axis.preRender()\n\n const m = axis.getRequiredMargin()\n if (axisMargin.top < m.top) axisMargin.top = m.top\n if (axisMargin.bottom < m.bottom) axisMargin.bottom = m.bottom\n if (axisMargin.left < m.left) axisMargin.left = m.left\n if (axisMargin.right < m.right) axisMargin.right = m.right\n })\n this._axisMargin = axisMargin\n }\n }\n\n private _getMargin (): Spacing {\n const { config: { margin } } = this\n\n return {\n top: margin.top + this._axisMargin.top,\n bottom: margin.bottom + this._axisMargin.bottom,\n left: margin.left + this._axisMargin.left,\n right: margin.right + this._axisMargin.right,\n }\n }\n\n public destroy (): void {\n const { components, config: { tooltip, crosshair, annotations, xAxis, yAxis } } = this\n super.destroy()\n\n for (const c of components) c?.destroy()\n tooltip?.destroy()\n crosshair?.destroy()\n annotations?.destroy()\n xAxis?.destroy()\n yAxis?.destroy()\n }\n}\n"],"names":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A,KAAA,CAAA,GAAD,CAAC,CAAE,OAAO,EAAE,CAAA;AACxC,QAAA,OAAO,aAAP,OAAO,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAP,OAAO,CAAE,OAAO,EAAE,CAAA;AAClB,QAAA,SAAS,aAAT,SAAS,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAT,SAAS,CAAE,OAAO,EAAE,CAAA;AACpB,QAAA,WAAW,aAAX,WAAW,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAX,WAAW,CAAE,OAAO,EAAE,CAAA;AACtB,QAAA,KAAK,aAAL,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAL,KAAK,CAAE,OAAO,EAAE,CAAA;AAChB,QAAA,KAAK,aAAL,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAL,KAAK,CAAE,OAAO,EAAE,CAAA;KACjB;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/containers/xy-container/index.ts"],"sourcesContent":["import { css } from '@emotion/css'\nimport { extent, merge as mergeArrays } from 'd3-array'\nimport { Selection } from 'd3-selection'\n\n// Global CSS variables (side effects import)\nimport 'styles/index'\n\n// Core\nimport { ContainerCore } from 'core/container'\nimport { XYComponentCore } from 'core/xy-component'\nimport { XYComponentConfigInterface } from 'core/xy-component/config'\n\n// Data Model\nimport { CoreDataModel } from 'data-models/core'\n\n// Types\nimport { Spacing } from 'types/spacing'\nimport { AxisType } from 'components/axis/types'\nimport { ScaleDimension } from 'types/scale'\nimport { Direction } from 'types/direction'\n\n// Utils\nimport { clamp, clean, flatten } from 'utils/data'\nimport { guid } from 'utils/misc'\n\n// Config\nimport { XYContainerDefaultConfig, XYContainerConfigInterface } from './config'\nimport {\n AreaConfigInterface,\n BrushConfigInterface,\n LineConfigInterface,\n ScatterConfigInterface,\n StackedBarConfigInterface,\n TimelineConfigInterface,\n} from '../../components'\n\nexport type XYConfigInterface<Datum> = XYComponentConfigInterface<Datum>\n| StackedBarConfigInterface<Datum>\n| LineConfigInterface<Datum>\n| ScatterConfigInterface<Datum>\n| BrushConfigInterface<Datum>\n| TimelineConfigInterface<Datum>\n| AreaConfigInterface<Datum>\n\nexport class XYContainer<Datum> extends ContainerCore {\n protected _defaultConfig = XYContainerDefaultConfig as XYContainerConfigInterface<Datum>\n protected _svgDefs: Selection<SVGDefsElement, unknown, null, undefined>\n public datamodel: CoreDataModel<Datum[]> = new CoreDataModel()\n public config: XYContainerConfigInterface<Datum> = this._defaultConfig\n private _clipPath: Selection<SVGClipPathElement, unknown, null, undefined>\n private _clipPathId = guid()\n private _axisMargin: Spacing = { top: 0, bottom: 0, left: 0, right: 0 }\n private _firstRender = true\n\n constructor (element: HTMLElement, config?: XYContainerConfigInterface<Datum>, data?: Datum[]) {\n super(element)\n\n this._clipPath = this.svg.append('clipPath')\n .attr('id', this._clipPathId)\n this._clipPath.append('rect')\n\n // When the base tag is specified on the HTML head,\n // Safari fails to find the corresponding filter URL.\n // We have to provide tull url in order to fix that\n const highlightFilterId = 'saturate'\n const baseUrl = window.location.href.replace(window.location.hash, '')\n this.svg.attr('class', css`\n --highlight-filter-id: url(${baseUrl}#${highlightFilterId}); // defining a css variable\n `)\n\n this._svgDefs.append('filter')\n .attr('id', highlightFilterId)\n .attr('filterUnits', 'objectBoundingBox')\n .html('<feColorMatrix type=\"saturate\" in=\"SourceGraphic\" values=\"1.35\"/>')\n\n if (config) {\n this.updateContainer(config, true)\n }\n\n if (data) {\n this.setData(data, true)\n }\n\n // Render if there are axes or components with data\n if (\n this.config.xAxis ||\n this.config.yAxis ||\n this.components?.some(c => c.datamodel.data)\n ) {\n this.render()\n }\n\n // Force re-render axes when fonts are loaded\n (document as any).fonts?.ready.then(() => {\n if (!this._firstRender) this._renderAxes(0)\n })\n }\n\n get components (): XYComponentCore<Datum>[] {\n return this.config.components\n }\n\n // Overriding ContainerCore default get width method to work with axis auto margin\n get width (): number {\n const margin = this._getMargin()\n return clamp(this.containerWidth - margin.left - margin.right, 0, Number.POSITIVE_INFINITY)\n }\n\n // Overriding ContainerCore default get height method to work with axis auto margin\n get height (): number {\n const margin = this._getMargin()\n\n return clamp(this.containerHeight - margin.top - margin.bottom, 0, Number.POSITIVE_INFINITY)\n }\n\n public setData (data: Datum[], preventRender?: boolean): void {\n const { components, config } = this\n if (!data) return\n this.datamodel.data = data\n\n components.forEach((c) => {\n c.setData(data)\n })\n\n config.crosshair?.setData(data)\n config.xAxis?.setData(data)\n config.yAxis?.setData(data)\n config.tooltip?.hide()\n if (!preventRender) this.render()\n }\n\n public updateContainer (containerConfig: XYContainerConfigInterface<Datum>, preventRender?: boolean): void {\n super.updateContainer(containerConfig)\n this._removeAllChildren()\n\n // If there were any new components added we need to pass them data\n this.setData(this.datamodel.data, true)\n\n // Set up the axes\n if (containerConfig.xAxis) {\n this.config.xAxis.config.type = AxisType.X\n this.element.appendChild(containerConfig.xAxis.element)\n }\n if (containerConfig.yAxis) {\n this.config.yAxis.config.type = AxisType.Y\n this.element.appendChild(containerConfig.yAxis.element)\n }\n\n // Re-insert elements to the DOM\n for (const c of this.components) {\n this.element.appendChild(c.element)\n }\n\n // Set up the tooltip\n const tooltip = containerConfig.tooltip\n if (tooltip) {\n if (!tooltip.hasContainer()) tooltip.setContainer(this._container)\n tooltip.setComponents(this.components)\n }\n\n // Set up the crosshair\n const crosshair = containerConfig.crosshair\n if (crosshair) {\n crosshair.setContainer(this.svg)\n crosshair.tooltip = tooltip\n\n this.element.appendChild(crosshair.element)\n }\n\n // Set up annotations\n const annotations = containerConfig.annotations\n if (annotations) {\n this.element.appendChild(annotations.element)\n }\n\n // Clipping path\n this.element.appendChild(this._clipPath.node())\n\n // Defs\n this.element.appendChild(this._svgDefs.node())\n this.element.appendChild(this._svgDefsExternal.node())\n\n // Rendering\n if (!preventRender) this.render()\n }\n\n public updateComponents (componentConfigs: XYConfigInterface<Datum>[], preventRender?: boolean): void {\n const { config } = this\n\n this.components.forEach((c, i) => {\n const componentConfig = componentConfigs[i]\n if (componentConfig) {\n c.setConfig(componentConfigs[i])\n }\n })\n\n this._updateScales(...this.components, config.xAxis, config.yAxis, config.crosshair)\n if (!preventRender) this.render()\n }\n\n public update (containerConfig: XYContainerConfigInterface<Datum>, componentConfigs?: XYComponentConfigInterface<Datum>[], data?: Datum[]): void {\n if (data) this.datamodel.data = data // Just updating the data model because the `updateContainer` method has the `setData` step inside\n if (containerConfig) this.updateContainer(containerConfig, true)\n if (componentConfigs) this.updateComponents(componentConfigs, true)\n this.render()\n }\n\n protected _preRender (): void {\n const { config } = this\n super._preRender()\n\n // Calculate extra margin required to fit the axes\n if (config.autoMargin) {\n this._setAutoMargin()\n }\n\n // Pass size to the components\n const components = clean([...this.components, config.xAxis, config.yAxis, config.crosshair, config.annotations])\n for (const c of components) {\n c.setSize(this.width, this.height, this.containerWidth, this.containerHeight)\n }\n\n // Update Scales of all the components at once to calculate required paddings and sync them\n this._updateScales(...this.components, config.xAxis, config.yAxis, config.crosshair)\n }\n\n protected _render (customDuration?: number): void {\n const { config } = this\n super._render()\n\n // Get chart total margin after auto margin calculations\n const margin = this._getMargin()\n\n // Render components\n for (const c of this.components) {\n c.g.attr('transform', `translate(${margin.left},${margin.top})`)\n .style('clip-path', c.clippable ? `url(#${this._clipPathId})` : null)\n .style('-webkit-clip-path', c.clippable ? `url(#${this._clipPathId})` : null)\n\n c.render(customDuration)\n }\n\n this._renderAxes(this._firstRender ? 0 : customDuration)\n\n // Clip RectsetSize\n // Extending the clipping path to allow small overflow (e.g. Line will looks better that way when it touches the edges)\n const clipPathExtension = 2\n this._clipPath.select('rect')\n .attr('x', -clipPathExtension)\n .attr('y', -clipPathExtension)\n .attr('width', this.width + 2 * clipPathExtension)\n .attr('height', this.height + 2 * clipPathExtension)\n\n // Tooltip\n config.tooltip?.update() // Re-bind events\n\n // Crosshair\n const crosshair = config.crosshair\n if (crosshair) {\n // Pass accessors\n const yAccessors = this.components.filter(c => !c.stacked).map(c => c.config.y)\n const yStackedAccessors = this.components.filter(c => c.stacked).map(c => c.config.y)\n const baselineComponentConfig = this.components.find(c => (c.config as AreaConfigInterface<Datum>).baseline)?.config as AreaConfigInterface<Datum>\n const baselineAccessor = baselineComponentConfig?.baseline\n\n crosshair.accessors = {\n x: this.components[0]?.config.x,\n y: flatten(yAccessors),\n yStacked: flatten(yStackedAccessors),\n baseline: baselineAccessor,\n }\n\n crosshair.g.attr('transform', `translate(${margin.left},${margin.top})`)\n .style('clip-path', `url(#${this._clipPathId})`)\n .style('-webkit-clip-path', `url(#${this._clipPathId})`)\n crosshair.hide()\n }\n\n config.annotations?.g.attr('transform', `translate(${margin.left},${margin.top})`)\n config.annotations?.render()\n\n this._firstRender = false\n }\n\n private _updateScales<T extends XYComponentCore<Datum>> (...components: T[]): void {\n const c = clean(components || this.components)\n this._setScales(...c)\n this._updateScalesDomain(...c)\n this._updateScalesRange(...c)\n }\n\n private _setScales<T extends XYComponentCore<Datum>> (...components: T[]): void {\n const { config } = this\n if (!components) return\n\n // Set the X and Y scales\n if (config.xScale) components.forEach(c => c.setScale(ScaleDimension.X, config.xScale))\n if (config.yScale) components.forEach(c => c.setScale(ScaleDimension.Y, config.yScale))\n }\n\n private _updateScalesDomain<T extends XYComponentCore<Datum>> (...components: T[]): void {\n const { config } = this\n if (!components) return\n\n const componentsWithDomain = components.filter(c => !c.config.excludeFromDomainCalculation)\n\n // Loop over all the dimensions\n Object.values(ScaleDimension).forEach((dimension: ScaleDimension) => {\n const [min, max] = extent(\n mergeArrays(\n componentsWithDomain.map(c => c.getDataExtent(dimension, config.scaleByDomain))\n ) as number[]\n ) // Components with undefined dimension accessors will return [undefined, undefined] but d3.extent will take care of that\n\n const configuredDomain = dimension === ScaleDimension.Y ? config.yDomain : config.xDomain\n const configuredDomainMinConstraint = dimension === ScaleDimension.Y ? config.yDomainMinConstraint : config.xDomainMinConstraint\n const configuredDomainMaxConstraint = dimension === ScaleDimension.Y ? config.yDomainMaxConstraint : config.xDomainMaxConstraint\n const domainMin = configuredDomain?.[0] ?? min ?? 0\n const domainMax = configuredDomain?.[1] ?? max ?? 1\n const domain = [\n clamp(domainMin, configuredDomainMinConstraint?.[0] ?? Number.NEGATIVE_INFINITY, configuredDomainMinConstraint?.[1] ?? Number.POSITIVE_INFINITY),\n clamp(domainMax, configuredDomainMaxConstraint?.[0] ?? Number.NEGATIVE_INFINITY, configuredDomainMaxConstraint?.[1] ?? Number.POSITIVE_INFINITY),\n ]\n\n // Extend the X and Y domains if they're empty and `preventEmptyDomain` was explicitly set to `true`\n // or just the X domain if there is no data provided and `preventEmptyDomain` set to `null`\n if (domain[0] === domain[1]) {\n const hasDataProvided = componentsWithDomain.some(c => c.datamodel.data?.length > 0)\n if (config.preventEmptyDomain || (config.preventEmptyDomain === null && (!hasDataProvided || dimension === ScaleDimension.Y))) {\n domain[1] = domain[0] + 1\n }\n }\n\n components.forEach(c => c.setScaleDomain(dimension, domain))\n })\n }\n\n private _updateScalesRange<T extends XYComponentCore<Datum>> (...components: T[]): void {\n const { config } = this\n if (!components) return\n\n // Set initial scale range\n const isYDirectionSouth = config.yDirection === Direction.South\n const xRange: [number, number] = [config.padding.left ?? 0, this.width - config.padding.right ?? 0]\n const yRange: [number, number] = [this.height - config.padding.bottom ?? 0, config.padding.top ?? 0]\n if (isYDirectionSouth) yRange.reverse()\n\n for (const c of components) {\n c.setSize(this.width, this.height, this.containerWidth, this.containerHeight)\n c.setScaleRange(ScaleDimension.X, config.xRange ?? xRange)\n c.setScaleRange(ScaleDimension.Y, config.yRange ?? yRange)\n }\n\n // Get and combine bleed\n const bleed = components.map(c => c.bleed).reduce((bleed, b) => {\n for (const key of Object.keys(bleed)) {\n const k = key as keyof Spacing\n if (bleed[k] < b[k]) bleed[k] = b[k]\n }\n return bleed\n }, { top: 0, bottom: 0, left: 0, right: 0 })\n\n // Update scale range\n for (const c of components) {\n c.setScaleRange(ScaleDimension.X, [xRange[0] + bleed.left, xRange[1] - bleed.right])\n c.setScaleRange(\n ScaleDimension.Y,\n isYDirectionSouth\n ? [yRange[0] + bleed.top, yRange[1] - bleed.bottom] // if Y axis is directed downwards\n : [yRange[0] - bleed.bottom, yRange[1] + bleed.top] // if Y axis is directed upwards\n )\n }\n }\n\n private _renderAxes (duration: number): void {\n const { config: { xAxis, yAxis } } = this\n const margin = this._getMargin()\n\n const axes = clean([xAxis, yAxis])\n axes.forEach(axis => {\n const offset = axis.getOffset(margin)\n axis.g.attr('transform', `translate(${offset.left},${offset.top})`)\n axis.render(duration)\n })\n }\n\n private _setAutoMargin (): void {\n const { config: { xAxis, yAxis } } = this\n\n // At first we need to set the domain to the scales\n const components = clean([...this.components, xAxis, yAxis])\n this._updateScalesDomain(...components)\n\n // Calculate margin required by the axes\n // We do two iterations on the first render, because the amount and size of ticks can change\n // after new margin are calculated and applied (axes dimensions will change).\n // That's needed for correct label placement.\n const numIterations = this._firstRender ? 2 : 1\n for (let i = 0; i < numIterations; i += 1) {\n const axisMargin: Spacing = { top: 0, bottom: 0, left: 0, right: 0 }\n this._updateScalesRange(...components)\n const axes = clean([xAxis, yAxis])\n axes.forEach(axis => {\n axis.preRender()\n\n const m = axis.getRequiredMargin()\n if (axisMargin.top < m.top) axisMargin.top = m.top\n if (axisMargin.bottom < m.bottom) axisMargin.bottom = m.bottom\n if (axisMargin.left < m.left) axisMargin.left = m.left\n if (axisMargin.right < m.right) axisMargin.right = m.right\n })\n this._axisMargin = axisMargin\n }\n }\n\n private _getMargin (): Spacing {\n const { config: { margin } } = this\n\n return {\n top: margin.top + this._axisMargin.top,\n bottom: margin.bottom + this._axisMargin.bottom,\n left: margin.left + this._axisMargin.left,\n right: margin.right + this._axisMargin.right,\n }\n }\n\n public destroy (): void {\n const { components, config: { tooltip, crosshair, annotations, xAxis, yAxis } } = this\n super.destroy()\n\n for (const c of components) c?.destroy()\n tooltip?.destroy()\n crosshair?.destroy()\n annotations?.destroy()\n xAxis?.destroy()\n yAxis?.destroy()\n }\n}\n"],"names":["mergeArrays"],"mappings":";;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F,KAAK,CAAC,OAAO,EAAE,CAAA;QAEf,KAAK,MAAM,CAAC,IAAI,UAAU;AAAE,YAAA,CAAC,aAAD,CAAC,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAD,CAAC,CAAE,OAAO,EAAE,CAAA;AACxC,QAAA,OAAO,aAAP,OAAO,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAP,OAAO,CAAE,OAAO,EAAE,CAAA;AAClB,QAAA,SAAS,aAAT,SAAS,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAT,SAAS,CAAE,OAAO,EAAE,CAAA;AACpB,QAAA,WAAW,aAAX,WAAW,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAX,WAAW,CAAE,OAAO,EAAE,CAAA;AACtB,QAAA,KAAK,aAAL,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAL,KAAK,CAAE,OAAO,EAAE,CAAA;AAChB,QAAA,KAAK,aAAL,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAL,KAAK,CAAE,OAAO,EAAE,CAAA;KACjB;AACF;;;;"}
|
|
@@ -8,8 +8,8 @@ export declare class ComponentCore<CoreDatum, ConfigInterface extends ComponentC
|
|
|
8
8
|
element: SVGGElement | HTMLElement;
|
|
9
9
|
type: ComponentType;
|
|
10
10
|
g: Selection<SVGGElement, unknown, null, undefined> | Selection<HTMLElement, unknown, null, undefined>;
|
|
11
|
-
config:
|
|
12
|
-
prevConfig:
|
|
11
|
+
config: ConfigInterface;
|
|
12
|
+
prevConfig: ConfigInterface;
|
|
13
13
|
datamodel: CoreDataModel<CoreDatum>;
|
|
14
14
|
sizing: Sizing | string;
|
|
15
15
|
uid: string;
|
|
@@ -19,7 +19,7 @@ export declare class ComponentCore<CoreDatum, ConfigInterface extends ComponentC
|
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
/** Default configuration */
|
|
22
|
-
protected _defaultConfig:
|
|
22
|
+
protected _defaultConfig: ConfigInterface;
|
|
23
23
|
/** Component width in pixels. This property is set automatically by the container. */
|
|
24
24
|
protected _width: number;
|
|
25
25
|
/** Component height in pixels. This property is set automatically by the container. */
|