@d3plus/core 3.1.3 → 3.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5093 -5092
- package/es/src/utils/D3plusConfig.js.map +1 -1
- package/package.json +8 -8
- package/types/src/utils/D3plusConfig.d.ts +4 -2
- package/umd/d3plus-core.full.js +1 -1
- package/umd/d3plus-core.full.min.js +1 -1
- package/umd/d3plus-core.js +1 -1
- package/umd/d3plus-core.min.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/D3plusConfig.ts"],"sourcesContent":["import type {DataPoint} from \"@d3plus/data\";\n\ntype Position = \"top\" | \"right\" | \"bottom\" | \"left\";\n\ntype DataPointAccessor<T> = string | ((d: DataPoint) => T);\n\ntype AxisScale =\n | \"auto\"\n | \"band\"\n | \"diverging\"\n | \"divergingLog\"\n | \"divergingPow\"\n | \"divergingSqrt\"\n | \"divergingSymlog\"\n | \"identity\"\n | \"implicit\"\n | \"jenks\"\n | \"linear\"\n | \"log\"\n | \"ordinal\"\n | \"point\"\n | \"pow\"\n | \"quantile\"\n | \"quantize\"\n | \"radial\"\n | \"sequential\"\n | \"sequentialLog\"\n | \"sequentialPow\"\n | \"sequentialQuantile\"\n | \"sequentialSqrt\"\n | \"sequentialSymlog\"\n | \"sqrt\"\n | \"symlog\"\n | \"threshold\"\n | \"time\"\n | \"utc\";\n\nexport interface AxisConfig {\n barConfig?: Record<string, string | number>;\n gridConfig?: Record<string, string | number>;\n label?: string;\n labels?: unknown[];\n labelOffset?: false | number;\n maxSize?: number;\n scale?: AxisScale;\n tickFormat?: (d: number | string) => string | number;\n ticks?: unknown[];\n tickSize?: number;\n title?: string;\n}\n\nexport interface TooltipConfig {\n title?: ((d: DataPoint) => string) | string;\n body?: ((d: DataPoint) => string) | string;\n thead?:\n | ((d: DataPoint) => [string, string][])\n | Array<\n Array<\n | ((d: DataPoint, i?: number, x?: {share: number}) => string)\n | string\n >\n >;\n tbody?:\n | ((d: DataPoint) => [string, string][])\n | Array<\n Array<\n | ((d: DataPoint, i?: number, x?: {share: number}) => string)\n | string\n >\n >;\n}\n\nexport interface D3plusConfig {\n /** Data array or URL string to load data from. */\n data?: DataPoint[] | string;\n /** Locale code used for text and number formatting. */\n locale?: string;\n\n /** Custom aggregation functions keyed by data property. */\n aggs?: {[k: string]: (d: DataPoint[]) => unknown};\n /** Padding between bars in pixels. */\n barPadding?: number;\n /** Color scale key or custom color function. */\n colorScale?: string | ((d: number) => string);\n /** Configuration for the color scale component. */\n colorScaleConfig?: {\n axisConfig?: AxisConfig;\n centered?: boolean;\n colors?: string[];\n colorMin?: string;\n colorMid?: string;\n colorMax?: string;\n scale?: AxisScale;\n };\n /** Position of the color scale, or false to hide it. */\n colorScalePosition?: false | Position;\n /** Column key for matrix-style layouts. */\n column?: string;\n /** Active depth level for nested groupings. */\n depth?: number;\n /** Sets orientation of main category axis. */\n discrete?: \"x\" | \"y\";\n /** Allows removing specific geographies from topojson file to improve zoom. */\n fitFilter?:\n | number\n | string\n | ((d: Record<string, unknown>) => boolean);\n /** Grouping key(s) or accessor function(s). */\n groupBy?:\n | string\n | string[]\n | ((d: DataPoint) => string | number)\n | ((d: DataPoint) => string | number)[];\n /** Padding between groups of bars in pixels. */\n groupPadding?: number;\n /** Label accessor for shapes. */\n label?: string | ((...args: unknown[]) => string);\n /** Whether to show the legend. */\n legend?: boolean;\n /** Configuration for the legend component. */\n legendConfig?: {\n label?: DataPointAccessor<string>;\n shapeConfig?: Record<string, string | number>;\n };\n /** Position of the legend. */\n legendPosition?: Position;\n /** Tooltip configuration for legend items. */\n legendTooltip?: TooltipConfig;\n /** Whether to show labels on line charts. */\n lineLabels?: boolean;\n /** Whether to show the loading message. */\n loadingMessage?: boolean;\n /** Custom HTML content for the loading indicator. */\n loadingHTML?: string;\n /** Metric key for the visualization. */\n metric?: string;\n /** Ocean color for geomaps (any CSS value including 'transparent'). */\n ocean?: string;\n /** Event listeners keyed by event name. */\n on?: Record<string, (event: Event) => void>;\n /** Coordinate accessor for point-based geomaps. */\n point?: (d: DataPoint) => number[];\n /** Point size accessor for geomaps. */\n pointSize?: string | ((d: DataPoint) => number);\n /** Minimum point size for geomaps. */\n pointSizeMin?: number;\n /** Maximum point size for geomaps. */\n pointSizeMax?: number;\n /** Map projection name or function. */\n projection?: string | ((x: number, y: number) => [number, number]);\n /** Outer padding between the visualization edge and map shapes. */\n projectionPadding?: number | string;\n /** Rotation offset for the map projection center. */\n projectionRotate?: [number, number];\n /** Row key for matrix-style layouts. */\n row?: string;\n /** Scrollable container selector for tooltip positioning. */\n scrollContainer?: string | Window;\n /** Configuration for shape rendering. */\n shapeConfig?: {\n duration?: number;\n [key: string]: unknown;\n };\n /** Size accessor key. */\n size?: string;\n /** Whether to stack series. */\n stacked?: boolean;\n /** Custom order for stacked series. */\n stackOrder?: string[];\n /** Value accessor for treemaps and aggregation. */\n sum?: DataPointAccessor<number>;\n /** Threshold value for grouping small slices. */\n threshold?: number;\n /** Label for the threshold group. */\n thresholdName?: string;\n /** URL to XYZ map tiles. */\n tileUrl?: string;\n /** Whether to show map tiles. */\n tiles?: boolean;\n /** Time key for temporal data. */\n time?: string;\n /** Chart title or title accessor function. */\n title?: string | ((data: DataPoint[]) => string);\n /** CSS style configuration for the title. */\n titleConfig?: Record<string, string | number>;\n /** Whether to show tooltips. */\n tooltip?: boolean;\n /** Configuration for the tooltip component. */\n tooltipConfig?: TooltipConfig;\n /** Path or object for the topojson data. */\n topojson?: string | object;\n /** CSS color to fill the map shapes. */\n topojsonFill?: string;\n /** Accessor function for topojson feature IDs. */\n topojsonId?: (obj: Record<string, unknown>) => string;\n /** Value accessor for the visualization. */\n value?: DataPointAccessor<number>;\n /** Key, index, or accessor function for x-axis values. */\n x?: string | number | ((...args: unknown[]) => unknown);\n /** Configuration for the x-axis. */\n xConfig?: AxisConfig;\n /** Custom sort function for x-axis values. */\n xSort?: (a: DataPoint, b: DataPoint) => number;\n /** Key, index, or accessor function for y-axis values. */\n y?: string | number | ((...args: unknown[]) => unknown);\n /** Configuration for the y-axis. */\n yConfig?: AxisConfig;\n /** Custom sort function for y-axis values. */\n ySort?: (a: DataPoint, b: DataPoint) => number;\n /** Set to false to disable zooming on
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/D3plusConfig.ts"],"sourcesContent":["import type {DataPoint} from \"@d3plus/data\";\n\ntype Position = \"top\" | \"right\" | \"bottom\" | \"left\";\n\ntype DataPointAccessor<T> = string | ((d: DataPoint) => T);\n\ntype AxisScale =\n | \"auto\"\n | \"band\"\n | \"diverging\"\n | \"divergingLog\"\n | \"divergingPow\"\n | \"divergingSqrt\"\n | \"divergingSymlog\"\n | \"identity\"\n | \"implicit\"\n | \"jenks\"\n | \"linear\"\n | \"log\"\n | \"ordinal\"\n | \"point\"\n | \"pow\"\n | \"quantile\"\n | \"quantize\"\n | \"radial\"\n | \"sequential\"\n | \"sequentialLog\"\n | \"sequentialPow\"\n | \"sequentialQuantile\"\n | \"sequentialSqrt\"\n | \"sequentialSymlog\"\n | \"sqrt\"\n | \"symlog\"\n | \"threshold\"\n | \"time\"\n | \"utc\";\n\nexport interface AxisConfig {\n barConfig?: Record<string, string | number>;\n gridConfig?: Record<string, string | number>;\n label?: string;\n labels?: unknown[];\n labelOffset?: false | number;\n maxSize?: number;\n scale?: AxisScale;\n tickFormat?: (d: number | string) => string | number;\n ticks?: unknown[];\n tickSize?: number;\n title?: string;\n}\n\nexport interface TooltipConfig {\n title?: ((d: DataPoint) => string) | string;\n body?: ((d: DataPoint) => string) | string;\n thead?:\n | ((d: DataPoint) => [string, string][])\n | Array<\n Array<\n | ((d: DataPoint, i?: number, x?: {share: number}) => string)\n | string\n >\n >;\n tbody?:\n | ((d: DataPoint) => [string, string][])\n | Array<\n Array<\n | ((d: DataPoint, i?: number, x?: {share: number}) => string)\n | string\n >\n >;\n}\n\nexport interface D3plusConfig {\n /** Data array or URL string to load data from. */\n data?: DataPoint[] | string;\n /** Locale code used for text and number formatting. */\n locale?: string;\n\n /** Custom aggregation functions keyed by data property. */\n aggs?: {[k: string]: (d: DataPoint[]) => unknown};\n /** Padding between bars in pixels. */\n barPadding?: number;\n /** Color scale key or custom color function. */\n colorScale?: string | ((d: number) => string);\n /** Configuration for the color scale component. */\n colorScaleConfig?: {\n axisConfig?: AxisConfig;\n centered?: boolean;\n colors?: string[];\n colorMin?: string;\n colorMid?: string;\n colorMax?: string;\n scale?: AxisScale;\n };\n /** Position of the color scale, or false to hide it. */\n colorScalePosition?: false | Position;\n /** Column key for matrix-style layouts. */\n column?: string;\n /** Active depth level for nested groupings. */\n depth?: number;\n /** Sets orientation of main category axis. */\n discrete?: \"x\" | \"y\";\n /** Default duration of transitions, in milliseconds. */\n duration?: number;\n /** Allows removing specific geographies from topojson file to improve zoom. */\n fitFilter?:\n | number\n | string\n | ((d: Record<string, unknown>) => boolean);\n /** Grouping key(s) or accessor function(s). */\n groupBy?:\n | string\n | string[]\n | ((d: DataPoint) => string | number)\n | ((d: DataPoint) => string | number)[];\n /** Padding between groups of bars in pixels. */\n groupPadding?: number;\n /** Label accessor for shapes. */\n label?: string | ((...args: unknown[]) => string);\n /** Whether to show the legend. */\n legend?: boolean;\n /** Configuration for the legend component. */\n legendConfig?: {\n label?: DataPointAccessor<string>;\n shapeConfig?: Record<string, string | number>;\n };\n /** Position of the legend. */\n legendPosition?: Position;\n /** Tooltip configuration for legend items. */\n legendTooltip?: TooltipConfig;\n /** Whether to show labels on line charts. */\n lineLabels?: boolean;\n /** Whether to show the loading message. */\n loadingMessage?: boolean;\n /** Custom HTML content for the loading indicator. */\n loadingHTML?: string;\n /** Metric key for the visualization. */\n metric?: string;\n /** Ocean color for geomaps (any CSS value including 'transparent'). */\n ocean?: string;\n /** Event listeners keyed by event name. */\n on?: Record<string, (event: Event) => void>;\n /** Coordinate accessor for point-based geomaps. */\n point?: (d: DataPoint) => number[];\n /** Point size accessor for geomaps. */\n pointSize?: string | ((d: DataPoint) => number);\n /** Minimum point size for geomaps. */\n pointSizeMin?: number;\n /** Maximum point size for geomaps. */\n pointSizeMax?: number;\n /** Map projection name or function. */\n projection?: string | ((x: number, y: number) => [number, number]);\n /** Outer padding between the visualization edge and map shapes. */\n projectionPadding?: number | string;\n /** Rotation offset for the map projection center. */\n projectionRotate?: [number, number];\n /** Row key for matrix-style layouts. */\n row?: string;\n /** Scrollable container selector for tooltip positioning. */\n scrollContainer?: string | Window;\n /** Configuration for shape rendering. */\n shapeConfig?: {\n duration?: number;\n [key: string]: unknown;\n };\n /** Size accessor key. */\n size?: string;\n /** Whether to stack series. */\n stacked?: boolean;\n /** Custom order for stacked series. */\n stackOrder?: string[];\n /** Value accessor for treemaps and aggregation. */\n sum?: DataPointAccessor<number>;\n /** Threshold value for grouping small slices. */\n threshold?: number;\n /** Label for the threshold group. */\n thresholdName?: string;\n /** URL to XYZ map tiles. */\n tileUrl?: string;\n /** Whether to show map tiles. */\n tiles?: boolean;\n /** Time key for temporal data. */\n time?: string;\n /** Chart title or title accessor function. */\n title?: string | ((data: DataPoint[]) => string);\n /** CSS style configuration for the title. */\n titleConfig?: Record<string, string | number>;\n /** Whether to show tooltips. */\n tooltip?: boolean;\n /** Configuration for the tooltip component. */\n tooltipConfig?: TooltipConfig;\n /** Path or object for the topojson data. */\n topojson?: string | object;\n /** CSS color to fill the map shapes. */\n topojsonFill?: string;\n /** Accessor function for topojson feature IDs. */\n topojsonId?: (obj: Record<string, unknown>) => string;\n /** Value accessor for the visualization. */\n value?: DataPointAccessor<number>;\n /** Key, index, or accessor function for x-axis values. */\n x?: string | number | ((...args: unknown[]) => unknown);\n /** Configuration for the x-axis. */\n xConfig?: AxisConfig;\n /** Custom sort function for x-axis values. */\n xSort?: (a: DataPoint, b: DataPoint) => number;\n /** Key, index, or accessor function for y-axis values. */\n y?: string | number | ((...args: unknown[]) => unknown);\n /** Configuration for the y-axis. */\n yConfig?: AxisConfig;\n /** Custom sort function for y-axis values. */\n ySort?: (a: DataPoint, b: DataPoint) => number;\n /** Set to false to disable zooming on Geomap and Network. */\n zoom?: boolean;\n\n /** Allows additional custom properties. */\n [key: string]: unknown;\n}\n"],"names":[],"mappings":"AAwEA,WAgJC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d3plus/core",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.5",
|
|
4
4
|
"description": "Data visualization made easy. A javascript library that extends the popular D3.js to enable fast and beautiful visualizations.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
"open-color": "^1.9.1",
|
|
59
59
|
"textures": "^1.2.3",
|
|
60
60
|
"topojson-client": "^3.1.0",
|
|
61
|
-
"@d3plus/
|
|
62
|
-
"@d3plus/format": "3.1.
|
|
63
|
-
"@d3plus/
|
|
64
|
-
"@d3plus/
|
|
65
|
-
"@d3plus/
|
|
66
|
-
"@d3plus/
|
|
67
|
-
"@d3plus/color": "3.1.
|
|
61
|
+
"@d3plus/data": "3.1.5",
|
|
62
|
+
"@d3plus/format": "3.1.5",
|
|
63
|
+
"@d3plus/dom": "3.1.5",
|
|
64
|
+
"@d3plus/text": "3.1.5",
|
|
65
|
+
"@d3plus/locales": "3.1.5",
|
|
66
|
+
"@d3plus/math": "3.1.5",
|
|
67
|
+
"@d3plus/color": "3.1.5"
|
|
68
68
|
},
|
|
69
69
|
"scripts": {
|
|
70
70
|
"build:esm": "node ../../scripts/build-esm.js",
|
|
@@ -56,6 +56,8 @@ export interface D3plusConfig {
|
|
|
56
56
|
depth?: number;
|
|
57
57
|
/** Sets orientation of main category axis. */
|
|
58
58
|
discrete?: "x" | "y";
|
|
59
|
+
/** Default duration of transitions, in milliseconds. */
|
|
60
|
+
duration?: number;
|
|
59
61
|
/** Allows removing specific geographies from topojson file to improve zoom. */
|
|
60
62
|
fitFilter?: number | string | ((d: Record<string, unknown>) => boolean);
|
|
61
63
|
/** Grouping key(s) or accessor function(s). */
|
|
@@ -156,8 +158,8 @@ export interface D3plusConfig {
|
|
|
156
158
|
yConfig?: AxisConfig;
|
|
157
159
|
/** Custom sort function for y-axis values. */
|
|
158
160
|
ySort?: (a: DataPoint, b: DataPoint) => number;
|
|
159
|
-
/** Set to false to disable zooming on
|
|
160
|
-
zoom?:
|
|
161
|
+
/** Set to false to disable zooming on Geomap and Network. */
|
|
162
|
+
zoom?: boolean;
|
|
161
163
|
/** Allows additional custom properties. */
|
|
162
164
|
[key: string]: unknown;
|
|
163
165
|
}
|
package/umd/d3plus-core.full.js
CHANGED
package/umd/d3plus-core.js
CHANGED
package/umd/d3plus-core.min.js
CHANGED