diff --git a/client/packages/lowcoder-comps/package.json b/client/packages/lowcoder-comps/package.json index 7b0a00e89..64bdf9011 100644 --- a/client/packages/lowcoder-comps/package.json +++ b/client/packages/lowcoder-comps/package.json @@ -23,6 +23,7 @@ "agora-rtm-sdk": "^1.5.1", "big.js": "^6.2.1", "echarts-extension-gmap": "^1.6.0", + "echarts-gl": "^2.0.9", "echarts-wordcloud": "^2.1.0", "lowcoder-cli": "workspace:^", "lowcoder-sdk": "workspace:^", @@ -90,6 +91,30 @@ "h": 40 } }, + "boxplotChart": { + "name": "Boxplot Chart", + "icon": "./icons/icon-chart.svg", + "layoutInfo": { + "w": 12, + "h": 40 + } + }, + "parallelChart": { + "name": "Parallel Chart", + "icon": "./icons/icon-chart.svg", + "layoutInfo": { + "w": 12, + "h": 40 + } + }, + "line3dChart": { + "name": "Line3D Chart", + "icon": "./icons/icon-chart.svg", + "layoutInfo": { + "w": 12, + "h": 40 + } + }, "imageEditor": { "name": "Image Editor", "icon": "./icons/icon-chart.svg", diff --git a/client/packages/lowcoder-comps/src/comps/basicChartComp/reactEcharts/index.ts b/client/packages/lowcoder-comps/src/comps/basicChartComp/reactEcharts/index.ts index dcb57f0f9..da1f165a1 100644 --- a/client/packages/lowcoder-comps/src/comps/basicChartComp/reactEcharts/index.ts +++ b/client/packages/lowcoder-comps/src/comps/basicChartComp/reactEcharts/index.ts @@ -1,4 +1,5 @@ import * as echarts from "echarts"; +import "echarts-gl"; import "echarts-wordcloud"; import { EChartsReactProps, EChartsInstance, EChartsOptionWithMap } from "./types"; import EChartsReactCore from "./core"; diff --git a/client/packages/lowcoder-comps/src/comps/boxplotChartComp/boxplotChartComp.tsx b/client/packages/lowcoder-comps/src/comps/boxplotChartComp/boxplotChartComp.tsx new file mode 100644 index 000000000..8cd1910b1 --- /dev/null +++ b/client/packages/lowcoder-comps/src/comps/boxplotChartComp/boxplotChartComp.tsx @@ -0,0 +1,282 @@ +import { + changeChildAction, + changeValueAction, + CompAction, + CompActionTypes, + wrapChildAction, +} from "lowcoder-core"; +import { AxisFormatterComp, EchartsAxisType } from "../basicChartComp/chartConfigs/cartesianAxisConfig"; +import { boxplotChartChildrenMap, ChartSize, getDataKeys } from "./boxplotChartConstants"; +import { boxplotChartPropertyView } from "./boxplotChartPropertyView"; +import _ from "lodash"; +import { useContext, useEffect, useMemo, useRef, useState } from "react"; +import ReactResizeDetector from "react-resize-detector"; +import ReactECharts from "../basicChartComp/reactEcharts"; +import * as echarts from "echarts"; +import { + childrenToProps, + depsConfig, + genRandomKey, + NameConfig, + UICompBuilder, + withDefault, + withExposingConfigs, + withViewFn, + ThemeContext, + chartColorPalette, + getPromiseAfterDispatch, + dropdownControl, +} from "lowcoder-sdk"; +import { getEchartsLocale, i18nObjs, trans } from "i18n/comps"; +import { + echartsConfigOmitChildren, + getEchartsConfig, + getSelectedPoints, +} from "./boxplotChartUtils"; +import 'echarts-extension-gmap'; +import log from "loglevel"; + +let clickEventCallback = () => {}; + +const chartModeOptions = [ + { + label: "UI", + value: "ui", + } +] as const; + +let BoxplotChartTmpComp = (function () { + return new UICompBuilder({mode:dropdownControl(chartModeOptions,'ui'),...boxplotChartChildrenMap}, () => null) + .setPropertyViewFn(boxplotChartPropertyView) + .build(); +})(); + +BoxplotChartTmpComp = withViewFn(BoxplotChartTmpComp, (comp) => { + const mode = comp.children.mode.getView(); + const onUIEvent = comp.children.onUIEvent.getView(); + const onEvent = comp.children.onEvent.getView(); + const echartsCompRef = useRef(); + const [chartSize, setChartSize] = useState(); + const firstResize = useRef(true); + const theme = useContext(ThemeContext); + const defaultChartTheme = { + color: chartColorPalette, + backgroundColor: "#fff", + }; + + let themeConfig = defaultChartTheme; + try { + themeConfig = theme?.theme.chart ? JSON.parse(theme?.theme.chart) : defaultChartTheme; + } catch (error) { + log.error('theme chart error: ', error); + } + + const triggerClickEvent = async (dispatch: any, action: CompAction) => { + await getPromiseAfterDispatch( + dispatch, + action, + { autoHandleAfterReduce: true } + ); + onEvent('click'); + } + + useEffect(() => { + const echartsCompInstance = echartsCompRef?.current?.getEchartsInstance(); + if (!echartsCompInstance) { + return _.noop; + } + echartsCompInstance?.on("click", (param: any) => { + document.dispatchEvent(new CustomEvent("clickEvent", { + bubbles: true, + detail: { + action: 'click', + data: param.data, + } + })); + triggerClickEvent( + comp.dispatch, + changeChildAction("lastInteractionData", param.data, false) + ); + }); + return () => { + echartsCompInstance?.off("click"); + document.removeEventListener('clickEvent', clickEventCallback) + }; + }, []); + + useEffect(() => { + // bind events + const echartsCompInstance = echartsCompRef?.current?.getEchartsInstance(); + if (!echartsCompInstance) { + return _.noop; + } + echartsCompInstance?.on("selectchanged", (param: any) => { + const option: any = echartsCompInstance?.getOption(); + document.dispatchEvent(new CustomEvent("clickEvent", { + bubbles: true, + detail: { + action: param.fromAction, + data: getSelectedPoints(param, option) + } + })); + + if (param.fromAction === "select") { + comp.dispatch(changeChildAction("selectedPoints", getSelectedPoints(param, option), false)); + onUIEvent("select"); + } else if (param.fromAction === "unselect") { + comp.dispatch(changeChildAction("selectedPoints", getSelectedPoints(param, option), false)); + onUIEvent("unselect"); + } + + triggerClickEvent( + comp.dispatch, + changeChildAction("lastInteractionData", getSelectedPoints(param, option), false) + ); + }); + // unbind + return () => { + echartsCompInstance?.off("selectchanged"); + document.removeEventListener('clickEvent', clickEventCallback) + }; + }, [onUIEvent]); + + const echartsConfigChildren = _.omit(comp.children, echartsConfigOmitChildren); + const childrenProps = childrenToProps(echartsConfigChildren); + + const option = useMemo(() => { + return getEchartsConfig( + childrenProps as ToViewReturn, + chartSize, + themeConfig + ); + }, [theme, childrenProps, chartSize, ...Object.values(echartsConfigChildren)]); + + return ( + { + if (w && h) { + setChartSize({ w: w, h: h }); + } + if (!firstResize.current) { + // ignore the first resize, which will impact the loading animation + echartsCompRef.current?.getEchartsInstance().resize(); + } else { + firstResize.current = false; + } + }} + > + (echartsCompRef.current = e)} + style={{ height: "100%" }} + notMerge + lazyUpdate + opts={{ locale: getEchartsLocale() }} + option={option} + mode={mode} + /> + + ); +}); + +function getYAxisFormatContextValue( + data: Array, + yAxisType: EchartsAxisType, + yAxisName?: string +) { + const dataSample = yAxisName && data.length > 0 && data[0][yAxisName]; + let contextValue = dataSample; + if (yAxisType === "time") { + // to timestamp + const time = + typeof dataSample === "number" || typeof dataSample === "string" + ? new Date(dataSample).getTime() + : null; + if (time) contextValue = time; + } + return contextValue; +} + +BoxplotChartTmpComp = class extends BoxplotChartTmpComp { + private lastYAxisFormatContextVal?: JSONValue; + private lastColorContext?: JSONObject; + + updateContext(comp: this) { + // the context value of axis format + let resultComp = comp; + const data = comp.children.data.getView(); + const yAxisContextValue = getYAxisFormatContextValue( + data, + comp.children.yConfig.children.yAxisType.getView(), + ); + if (yAxisContextValue !== comp.lastYAxisFormatContextVal) { + comp.lastYAxisFormatContextVal = yAxisContextValue; + resultComp = comp.setChild( + "yConfig", + comp.children.yConfig.reduce( + wrapChildAction( + "formatter", + AxisFormatterComp.changeContextDataAction({ value: yAxisContextValue }) + ) + ) + ); + } + return resultComp; + } + + override reduce(action: CompAction): this { + const comp = super.reduce(action); + if (action.type === CompActionTypes.UPDATE_NODES_V2) { + const newData = comp.children.data.getView(); + // data changes + if (comp.children.data !== this.children.data) { + setTimeout(() => { + // update x-axis value + const keys = getDataKeys(newData); + if (keys.length > 0 && !keys.includes(comp.children.xAxisKey.getView())) { + comp.children.xAxisKey.dispatch(changeValueAction(keys[0] || "")); + } + if (keys.length > 0 && !keys.includes(comp.children.yAxisKey.getView())) { + comp.children.yAxisKey.dispatch(changeValueAction(keys[1] || "")); + } + }, 0); + } + return this.updateContext(comp); + } + return comp; + } + + override autoHeight(): boolean { + return false; + } +}; + +let BoxplotChartComp = withExposingConfigs(BoxplotChartTmpComp, [ + depsConfig({ + name: "selectedPoints", + desc: trans("chart.selectedPointsDesc"), + depKeys: ["selectedPoints"], + func: (input) => { + return input.selectedPoints; + }, + }), + depsConfig({ + name: "lastInteractionData", + desc: trans("chart.lastInteractionDataDesc"), + depKeys: ["lastInteractionData"], + func: (input) => { + return input.lastInteractionData; + }, + }), + depsConfig({ + name: "data", + desc: trans("chart.dataDesc"), + depKeys: ["data", "mode"], + func: (input) =>[] , + }), + new NameConfig("title", trans("chart.titleDesc")), +]); + + +export const BoxplotChartCompWithDefault = withDefault(BoxplotChartComp, { + xAxisKey: "date", +}); diff --git a/client/packages/lowcoder-comps/src/comps/boxplotChartComp/boxplotChartConstants.tsx b/client/packages/lowcoder-comps/src/comps/boxplotChartComp/boxplotChartConstants.tsx new file mode 100644 index 000000000..ffec6b31e --- /dev/null +++ b/client/packages/lowcoder-comps/src/comps/boxplotChartComp/boxplotChartConstants.tsx @@ -0,0 +1,248 @@ +import { + jsonControl, + stateComp, + toJSONObjectArray, + toObject, + BoolControl, + ColorControl, + withDefault, + StringControl, + NumberControl, + dropdownControl, + list, + eventHandlerControl, + valueComp, + withType, + uiChildren, + clickEvent, + toArray, + styleControl, + EchartDefaultTextStyle, + EchartDefaultChartStyle, + MultiCompBuilder, +} from "lowcoder-sdk"; +import { RecordConstructorToComp, RecordConstructorToView } from "lowcoder-core"; +import { XAxisConfig, YAxisConfig } from "../basicChartComp/chartConfigs/cartesianAxisConfig"; +import { LegendConfig } from "../basicChartComp/chartConfigs/legendConfig"; +import { EchartsLegendConfig } from "../basicChartComp/chartConfigs/echartsLegendConfig"; +import { EchartsLabelConfig } from "../basicChartComp/chartConfigs/echartsLabelConfig"; +import { EChartsOption } from "echarts"; +import { i18nObjs, trans } from "i18n/comps"; +import {EchartsTitleVerticalConfig} from "../chartComp/chartConfigs/echartsTitleVerticalConfig"; +import {EchartsTitleConfig} from "../basicChartComp/chartConfigs/echartsTitleConfig"; + +export const UIEventOptions = [ + { + label: trans("chart.select"), + value: "select", + description: trans("chart.selectDesc"), + }, + { + label: trans("chart.unSelect"), + value: "unselect", + description: trans("chart.unselectDesc"), + }, +] as const; + +export const XAxisDirectionOptions = [ + { + label: trans("chart.horizontal"), + value: "horizontal", + }, + { + label: trans("chart.vertical"), + value: "vertical", + }, +] as const; + +export type XAxisDirectionType = ValueFromOption; + +export const noDataAxisConfig = { + animation: false, + xAxis: { + type: "category", + name: trans("chart.noData"), + nameLocation: "middle", + data: [], + axisLine: { + lineStyle: { + color: "#8B8FA3", + }, + }, + }, + yAxis: { + type: "value", + axisLabel: { + color: "#8B8FA3", + }, + splitLine: { + lineStyle: { + color: "#F0F0F0", + }, + }, + }, + tooltip: { + show: false, + }, + series: [ + { + data: [700], + type: "line", + itemStyle: { + opacity: 0, + }, + }, + ], +} as EChartsOption; + +export const noDataBoxplotChartConfig = { + animation: false, + tooltip: { + show: false, + }, + legend: { + formatter: trans("chart.unknown"), + top: "bottom", + selectedMode: false, + }, + color: ["#B8BBCC", "#CED0D9", "#DCDEE6", "#E6E6EB"], + series: [ + { + type: "boxplot", + radius: "35%", + center: ["25%", "50%"], + silent: true, + label: { + show: false, + }, + data: [ + { + name: "1", + value: 70, + }, + { + name: "2", + value: 68, + }, + { + name: "3", + value: 48, + }, + { + name: "4", + value: 40, + }, + ], + }, + { + type: "boxplot", + radius: "35%", + center: ["75%", "50%"], + silent: true, + label: { + show: false, + }, + data: [ + { + name: "1", + value: 70, + }, + { + name: "2", + value: 68, + }, + { + name: "3", + value: 48, + }, + { + name: "4", + value: 40, + }, + ], + }, + ], +} as EChartsOption; + +export type ChartSize = { w: number; h: number }; + +export const getDataKeys = (data: Array) => { + if (!data) { + return []; + } + const dataKeys: Array = []; + data[0].forEach((key) => { + if (!dataKeys.includes(key)) { + dataKeys.push(key); + } + }); + return dataKeys; +}; + +export const chartUiModeChildren = { + title: withDefault(StringControl, trans("echarts.defaultTitle")), + data: jsonControl(toArray, i18nObjs.defaultDatasourceBoxplot), + xAxisKey: valueComp(""), // x-axis, key from data + xAxisDirection: dropdownControl(XAxisDirectionOptions, "horizontal"), + xAxisData: jsonControl(toArray, []), + yAxisKey: valueComp(""), // x-axis, key from data + xConfig: XAxisConfig, + yConfig: YAxisConfig, + legendConfig: LegendConfig, + onUIEvent: eventHandlerControl(UIEventOptions), +}; + +let chartJsonModeChildren: any = { + echartsOption: jsonControl(toObject, i18nObjs.defaultEchartsJsonOption), + echartsTitle: withDefault(StringControl, trans("echarts.defaultTitle")), + echartsLegendConfig: EchartsLegendConfig, + echartsLabelConfig: EchartsLabelConfig, + echartsTitleVerticalConfig: EchartsTitleVerticalConfig, + echartsTitleConfig:EchartsTitleConfig, + + left:withDefault(NumberControl,trans('chart.defaultLeft')), + right:withDefault(NumberControl,trans('chart.defaultRight')), + top:withDefault(NumberControl,trans('chart.defaultTop')), + bottom:withDefault(NumberControl,trans('chart.defaultBottom')), + + tooltip: withDefault(BoolControl, true), + legendVisibility: withDefault(BoolControl, true), +} + +if (EchartDefaultChartStyle && EchartDefaultTextStyle) { + chartJsonModeChildren = { + ...chartJsonModeChildren, + chartStyle: styleControl(EchartDefaultChartStyle, 'chartStyle'), + titleStyle: styleControl(EchartDefaultTextStyle, 'titleStyle'), + xAxisStyle: styleControl(EchartDefaultTextStyle, 'xAxis'), + yAxisStyle: styleControl(EchartDefaultTextStyle, 'yAxisStyle'), + legendStyle: styleControl(EchartDefaultTextStyle, 'legendStyle'), + } +} + +export type UIChartDataType = { + seriesName: string; + // coordinate chart + x?: any; + y?: any; + // boxplot or funnel + itemName?: any; + value?: any; +}; + +export type NonUIChartDataType = { + name: string; + value: any; +} + +export const boxplotChartChildrenMap = { + selectedPoints: stateComp>([]), + lastInteractionData: stateComp | NonUIChartDataType>({}), + onEvent: eventHandlerControl([clickEvent] as const), + ...chartUiModeChildren, + ...chartJsonModeChildren, +}; + +const chartUiChildrenMap = uiChildren(boxplotChartChildrenMap); +export type ChartCompPropsType = RecordConstructorToView; +export type ChartCompChildrenType = RecordConstructorToComp; diff --git a/client/packages/lowcoder-comps/src/comps/boxplotChartComp/boxplotChartPropertyView.tsx b/client/packages/lowcoder-comps/src/comps/boxplotChartComp/boxplotChartPropertyView.tsx new file mode 100644 index 000000000..b6694e910 --- /dev/null +++ b/client/packages/lowcoder-comps/src/comps/boxplotChartComp/boxplotChartPropertyView.tsx @@ -0,0 +1,95 @@ +import { changeChildAction, CompAction } from "lowcoder-core"; +import { ChartCompChildrenType, getDataKeys } from "./boxplotChartConstants"; +import { + CustomModal, + Dropdown, + hiddenPropertyView, + Option, + RedButton, + Section, + sectionNames, + controlItem, +} from "lowcoder-sdk"; +import { trans } from "i18n/comps"; + +export function boxplotChartPropertyView( + children: ChartCompChildrenType, + dispatch: (action: CompAction) => void +) { + const columnOptions = getDataKeys(children.data.getView()).map((key) => ({ + label: key, + value: key, + })); + + const uiModePropertyView = ( + <> +
+ { + dispatch(changeChildAction("xAxisKey", value)); + }} + /> + { + dispatch(changeChildAction("yAxisKey", value)); + }} + /> +
+
+
+ {children.onUIEvent.propertyView({title: trans("chart.chartEventHandlers")})} +
+
+ {children.onEvent.propertyView()} +
+
+
+ {children.echartsTitleConfig.getPropertyView()} + {children.echartsTitleVerticalConfig.getPropertyView()} + {children.legendConfig.getPropertyView()} + {children.title.propertyView({ label: trans("chart.title") })} + {children.left.propertyView({ label: trans("chart.left"), tooltip: trans("echarts.leftTooltip") })} + {children.right.propertyView({ label: trans("chart.right"), tooltip: trans("echarts.rightTooltip") })} + {children.top.propertyView({ label: trans("chart.top"), tooltip: trans("echarts.topTooltip") })} + {children.bottom.propertyView({ label: trans("chart.bottom"), tooltip: trans("echarts.bottomTooltip") })} + {hiddenPropertyView(children)} + {children.tooltip.propertyView({label: trans("echarts.tooltip"), tooltip: trans("echarts.tooltipTooltip")})} +
+
+ {children.chartStyle?.getPropertyView()} +
+
+ {children.titleStyle?.getPropertyView()} +
+
+ {children.xAxisStyle?.getPropertyView()} +
+
+ {children.yAxisStyle?.getPropertyView()} +
+
+ {children.data.propertyView({ + label: trans("chart.data"), + })} +
+ + ); + + const getChatConfigByMode = (mode: string) => { + switch(mode) { + case "ui": + return uiModePropertyView; + } + } + return ( + <> + {getChatConfigByMode(children.mode.getView())} + + ); +} diff --git a/client/packages/lowcoder-comps/src/comps/boxplotChartComp/boxplotChartUtils.ts b/client/packages/lowcoder-comps/src/comps/boxplotChartComp/boxplotChartUtils.ts new file mode 100644 index 000000000..2bc1904d4 --- /dev/null +++ b/client/packages/lowcoder-comps/src/comps/boxplotChartComp/boxplotChartUtils.ts @@ -0,0 +1,293 @@ +import { + ChartCompPropsType, + ChartSize, + noDataBoxplotChartConfig, +} from "comps/boxplotChartComp/boxplotChartConstants"; +import { EChartsOptionWithMap } from "../basicChartComp/reactEcharts/types"; +import _ from "lodash"; +import { googleMapsApiUrl } from "../basicChartComp/chartConfigs/chartUrls"; +import parseBackground from "../../util/gradientBackgroundColor"; +import {chartStyleWrapper, styleWrapper} from "../../util/styleWrapper"; +// Define the configuration interface to match the original transform + +interface AggregateConfig { + resultDimensions: Array<{ + name: string; + from: string; + method?: string; // e.g., 'min', 'Q1', 'median', 'Q3', 'max' + }>; + groupBy: string; +} + +// Custom transform function +function customAggregateTransform(params: { + upstream: { source: any[] }; + config: AggregateConfig; +}): any[] { + const { upstream, config } = params; + const data = upstream.source; + + // Assume data is an array of arrays, with the first row as headers + const headers = data[0]; + const rows = data.slice(1); + + // Find the index of the groupBy column + const groupByIndex = headers.indexOf(config.groupBy); + if (groupByIndex === -1) { + return []; + } + + // Group rows by the groupBy column + const groups: { [key: string]: any[][] } = {}; + rows.forEach(row => { + const key = row[groupByIndex]; + if (!groups[key]) { + groups[key] = []; + } + groups[key].push(row); + }); + + // Define aggregation functions + const aggregators: { + [method: string]: (values: number[]) => number; + } = { + min: values => Math.min(...values), + max: values => Math.max(...values), + Q1: values => percentile(values, 25), + median: values => percentile(values, 50), + Q3: values => percentile(values, 75), + }; + + // Helper function to calculate percentiles (Q1, median, Q3) + function percentile(arr: number[], p: number): number { + const sorted = arr.slice().sort((a, b) => a - b); + const index = (p / 100) * (sorted.length - 1); + const i = Math.floor(index); + const f = index - i; + if (i === sorted.length - 1) { + return sorted[i]; + } + return sorted[i] + f * (sorted[i + 1] - sorted[i]); + } + + // Prepare output headers from resultDimensions + const outputHeaders = config.resultDimensions.map(dim => dim.name); + + // Compute aggregated data for each group + const aggregatedData: any[][] = []; + for (const key in groups) { + const groupRows = groups[key]; + const row: any[] = []; + + config.resultDimensions.forEach(dim => { + if (dim.from === config.groupBy) { + // Include the group key directly + row.push(key); + } else { + // Find the index of the 'from' column + const fromIndex = headers.indexOf(dim.from); + if (fromIndex === -1) { + return; + } + // Extract values for the 'from' column in this group + const values = groupRows + .map(r => parseFloat(r[fromIndex])) + .filter(v => !isNaN(v)); + if (dim.method && aggregators[dim.method]) { + // Apply the aggregation method + row.push(aggregators[dim.method](values)); + } else { + return; + } + } + }); + + aggregatedData.push(row); + } + + // Return the transformed data with headers + return [outputHeaders, ...aggregatedData]; +} + +export const echartsConfigOmitChildren = [ + "hidden", + "selectedPoints", + "onUIEvent", + "mapInstance" +] as const; +type EchartsConfigProps = Omit; + +// https://echarts.apache.org/en/option.html +export function getEchartsConfig( + props: EchartsConfigProps, + chartSize?: ChartSize, + theme?: any, +): EChartsOptionWithMap { + const gridPos = { + left: `${props?.left}%`, + right: `${props?.right}%`, + bottom: `${props?.bottom}%`, + top: `${props?.top}%`, + }; + + let config: any = { + title: { + text: props.title, + top: props.echartsTitleVerticalConfig.top, + left:props.echartsTitleConfig.top, + textStyle: { + ...styleWrapper(props?.titleStyle, theme?.titleStyle) + } + }, + backgroundColor: parseBackground( props?.chartStyle?.background || theme?.chartStyle?.backgroundColor || "#FFFFFF"), + tooltip: props.tooltip && { + trigger: "axis", + axisPointer: { + type: "line", + lineStyle: { + color: "rgba(0,0,0,0.2)", + width: 2, + type: "solid" + } + } + }, + grid: { + ...gridPos, + containLabel: true, + }, + xAxis: { + name: props.xAxisKey, + nameLocation: 'middle', + nameGap: 30, + scale: true, + axisLabel: { + ...styleWrapper(props?.xAxisStyle, theme?.xAxisStyle, 11) + } + }, + yAxis: { + type: "category", + axisLabel: { + ...styleWrapper(props?.yAxisStyle, theme?.yAxisStyle, 11) + } + }, + dataset: [ + { + id: 'raw', + source: customAggregateTransform({upstream: {source: props.data as any[]}, config:{ + resultDimensions: [ + { name: 'min', from: props.xAxisKey, method: 'min' }, + { name: 'Q1', from: props.xAxisKey, method: 'Q1' }, + { name: 'median', from: props.xAxisKey, method: 'median' }, + { name: 'Q3', from: props.xAxisKey, method: 'Q3' }, + { name: 'max', from: props.xAxisKey, method: 'max' }, + { name: props.yAxisKey, from: props.yAxisKey } + ], + groupBy: props.yAxisKey + }}), + }, + { + id: 'finaldataset', + fromDatasetId: 'raw', + transform: [ + { + type: 'sort', + config: { + dimension: 'Q3', + order: 'asc' + } + } + ] + } + ], + }; + + if (props.data.length <= 0) { + // no data + return { + ...config, + ...noDataBoxplotChartConfig, + }; + } + const yAxisConfig = props.yConfig(); + // y-axis is category and time, data doesn't need to aggregate + let transformedData = props.data; + + config = { + ...config, + series: [{ + name: props.xAxisKey, + type: 'boxplot', + datasetId: 'finaldataset', + encode: { + x: ['min', 'Q1', 'median', 'Q3', 'max'], + y: props.yAxisKey, + itemName: [props.yAxisKey], + tooltip: ['min', 'Q1', 'median', 'Q3', 'max'] + }, + itemStyle: { + color: '#b8c5f2', + ...chartStyleWrapper(props?.chartStyle, theme?.chartStyle) + }, + }], + }; + if(config.series[0].itemStyle.borderWidth === 0) config.series[0].itemStyle.borderWidth = 1; + + // console.log("Echarts transformedData and config", transformedData, config); + return config; +} + +export function getSelectedPoints(param: any, option: any) { + const series = option.series; + const dataSource = _.isArray(option.dataset) && option.dataset[0]?.source; + if (series && dataSource) { + return param.selected.flatMap((selectInfo: any) => { + const seriesInfo = series[selectInfo.seriesIndex]; + if (!seriesInfo || !seriesInfo.encode) { + return []; + } + return selectInfo.dataIndex.map((index: any) => { + const commonResult = { + seriesName: seriesInfo.name, + }; + if (seriesInfo.encode.itemName && seriesInfo.encode.value) { + return { + ...commonResult, + itemName: dataSource[index][seriesInfo.encode.itemName], + value: dataSource[index][seriesInfo.encode.value], + }; + } else { + return { + ...commonResult, + x: dataSource[index][seriesInfo.encode.x], + y: dataSource[index][seriesInfo.encode.y], + }; + } + }); + }); + } + return []; +} + +export function loadGoogleMapsScript(apiKey: string) { + const mapsUrl = `${googleMapsApiUrl}?key=${apiKey}`; + const scripts = document.getElementsByTagName('script'); + // is script already loaded + let scriptIndex = _.findIndex(scripts, (script) => script.src.endsWith(mapsUrl)); + if(scriptIndex > -1) { + return scripts[scriptIndex]; + } + // is script loaded with diff api_key, remove the script and load again + scriptIndex = _.findIndex(scripts, (script) => script.src.startsWith(googleMapsApiUrl)); + if(scriptIndex > -1) { + scripts[scriptIndex].remove(); + } + + const script = document.createElement("script"); + script.type = "text/javascript"; + script.src = mapsUrl; + script.async = true; + script.defer = true; + window.document.body.appendChild(script); + + return script; +} diff --git a/client/packages/lowcoder-comps/src/comps/line3dChartComp/images/default_ambient_cubemap_texture.hdr b/client/packages/lowcoder-comps/src/comps/line3dChartComp/images/default_ambient_cubemap_texture.hdr new file mode 100644 index 000000000..4d53b3609 Binary files /dev/null and b/client/packages/lowcoder-comps/src/comps/line3dChartComp/images/default_ambient_cubemap_texture.hdr differ diff --git a/client/packages/lowcoder-comps/src/comps/line3dChartComp/images/default_base_texture.jpg b/client/packages/lowcoder-comps/src/comps/line3dChartComp/images/default_base_texture.jpg new file mode 100644 index 000000000..c4a5d335c Binary files /dev/null and b/client/packages/lowcoder-comps/src/comps/line3dChartComp/images/default_base_texture.jpg differ diff --git a/client/packages/lowcoder-comps/src/comps/line3dChartComp/images/default_environment.jpg b/client/packages/lowcoder-comps/src/comps/line3dChartComp/images/default_environment.jpg new file mode 100644 index 000000000..314999840 Binary files /dev/null and b/client/packages/lowcoder-comps/src/comps/line3dChartComp/images/default_environment.jpg differ diff --git a/client/packages/lowcoder-comps/src/comps/line3dChartComp/images/default_height_texture.jpg b/client/packages/lowcoder-comps/src/comps/line3dChartComp/images/default_height_texture.jpg new file mode 100644 index 000000000..9f8dcdf31 Binary files /dev/null and b/client/packages/lowcoder-comps/src/comps/line3dChartComp/images/default_height_texture.jpg differ diff --git a/client/packages/lowcoder-comps/src/comps/line3dChartComp/line3dChartComp.tsx b/client/packages/lowcoder-comps/src/comps/line3dChartComp/line3dChartComp.tsx new file mode 100644 index 000000000..712e224b2 --- /dev/null +++ b/client/packages/lowcoder-comps/src/comps/line3dChartComp/line3dChartComp.tsx @@ -0,0 +1,282 @@ +import { + changeChildAction, + changeValueAction, + CompAction, + CompActionTypes, + wrapChildAction, +} from "lowcoder-core"; +import { AxisFormatterComp, EchartsAxisType } from "../basicChartComp/chartConfigs/cartesianAxisConfig"; +import { line3dChartChildrenMap, ChartSize, getDataKeys } from "./line3dChartConstants"; +import { line3dChartPropertyView } from "./line3dChartPropertyView"; +import _ from "lodash"; +import { useContext, useEffect, useMemo, useRef, useState } from "react"; +import ReactResizeDetector from "react-resize-detector"; +import ReactECharts from "../basicChartComp/reactEcharts"; +import * as echarts from "echarts"; +import { + childrenToProps, + depsConfig, + genRandomKey, + NameConfig, + UICompBuilder, + withDefault, + withExposingConfigs, + withViewFn, + ThemeContext, + chartColorPalette, + getPromiseAfterDispatch, + dropdownControl, +} from "lowcoder-sdk"; +import { getEchartsLocale, i18nObjs, trans } from "i18n/comps"; +import { + echartsConfigOmitChildren, + getEchartsConfig, + getSelectedPoints, +} from "./line3dChartUtils"; +import 'echarts-extension-gmap'; +import log from "loglevel"; + +let clickEventCallback = () => {}; + +const chartModeOptions = [ + { + label: "UI", + value: "ui", + } +] as const; + +let Line3DChartTmpComp = (function () { + return new UICompBuilder({mode:dropdownControl(chartModeOptions,'ui'),...line3dChartChildrenMap}, () => null) + .setPropertyViewFn(line3dChartPropertyView) + .build(); +})(); + +Line3DChartTmpComp = withViewFn(Line3DChartTmpComp, (comp) => { + const mode = comp.children.mode.getView(); + const onUIEvent = comp.children.onUIEvent.getView(); + const onEvent = comp.children.onEvent.getView(); + const echartsCompRef = useRef(); + const [chartSize, setChartSize] = useState(); + const firstResize = useRef(true); + const theme = useContext(ThemeContext); + const defaultChartTheme = { + color: chartColorPalette, + backgroundColor: "#fff", + }; + + let themeConfig = defaultChartTheme; + try { + themeConfig = theme?.theme.chart ? JSON.parse(theme?.theme.chart) : defaultChartTheme; + } catch (error) { + log.error('theme chart error: ', error); + } + + const triggerClickEvent = async (dispatch: any, action: CompAction) => { + await getPromiseAfterDispatch( + dispatch, + action, + { autoHandleAfterReduce: true } + ); + onEvent('click'); + } + + useEffect(() => { + const echartsCompInstance = echartsCompRef?.current?.getEchartsInstance(); + if (!echartsCompInstance) { + return _.noop; + } + echartsCompInstance?.on("click", (param: any) => { + document.dispatchEvent(new CustomEvent("clickEvent", { + bubbles: true, + detail: { + action: 'click', + data: param.data, + } + })); + triggerClickEvent( + comp.dispatch, + changeChildAction("lastInteractionData", param.data, false) + ); + }); + return () => { + echartsCompInstance?.off("click"); + document.removeEventListener('clickEvent', clickEventCallback) + }; + }, []); + + useEffect(() => { + // bind events + const echartsCompInstance = echartsCompRef?.current?.getEchartsInstance(); + if (!echartsCompInstance) { + return _.noop; + } + echartsCompInstance?.on("selectchanged", (param: any) => { + const option: any = echartsCompInstance?.getOption(); + document.dispatchEvent(new CustomEvent("clickEvent", { + bubbles: true, + detail: { + action: param.fromAction, + data: getSelectedPoints(param, option) + } + })); + + if (param.fromAction === "select") { + comp.dispatch(changeChildAction("selectedPoints", getSelectedPoints(param, option), false)); + onUIEvent("select"); + } else if (param.fromAction === "unselect") { + comp.dispatch(changeChildAction("selectedPoints", getSelectedPoints(param, option), false)); + onUIEvent("unselect"); + } + + triggerClickEvent( + comp.dispatch, + changeChildAction("lastInteractionData", getSelectedPoints(param, option), false) + ); + }); + // unbind + return () => { + echartsCompInstance?.off("selectchanged"); + document.removeEventListener('clickEvent', clickEventCallback) + }; + }, [onUIEvent]); + + const echartsConfigChildren = _.omit(comp.children, echartsConfigOmitChildren); + const childrenProps = childrenToProps(echartsConfigChildren); + + const option = useMemo(() => { + return getEchartsConfig( + childrenProps as ToViewReturn, + chartSize, + themeConfig + ); + }, [theme, childrenProps, chartSize, ...Object.values(echartsConfigChildren)]); + + return ( + { + if (w && h) { + setChartSize({ w: w, h: h }); + } + if (!firstResize.current) { + // ignore the first resize, which will impact the loading animation + echartsCompRef.current?.getEchartsInstance().resize(); + } else { + firstResize.current = false; + } + }} + > + (echartsCompRef.current = e)} + style={{ height: "100%" }} + notMerge + lazyUpdate + opts={{ locale: getEchartsLocale() }} + option={option} + mode={mode} + /> + + ); +}); + +function getYAxisFormatContextValue( + data: Array, + yAxisType: EchartsAxisType, + yAxisName?: string +) { + const dataSample = yAxisName && data.length > 0 && data[0][yAxisName]; + let contextValue = dataSample; + if (yAxisType === "time") { + // to timestamp + const time = + typeof dataSample === "number" || typeof dataSample === "string" + ? new Date(dataSample).getTime() + : null; + if (time) contextValue = time; + } + return contextValue; +} + +Line3DChartTmpComp = class extends Line3DChartTmpComp { + private lastYAxisFormatContextVal?: JSONValue; + private lastColorContext?: JSONObject; + + updateContext(comp: this) { + // the context value of axis format + let resultComp = comp; + const data = comp.children.data.getView(); + const yAxisContextValue = getYAxisFormatContextValue( + data, + comp.children.yConfig.children.yAxisType.getView(), + ); + if (yAxisContextValue !== comp.lastYAxisFormatContextVal) { + comp.lastYAxisFormatContextVal = yAxisContextValue; + resultComp = comp.setChild( + "yConfig", + comp.children.yConfig.reduce( + wrapChildAction( + "formatter", + AxisFormatterComp.changeContextDataAction({ value: yAxisContextValue }) + ) + ) + ); + } + return resultComp; + } + + override reduce(action: CompAction): this { + const comp = super.reduce(action); + if (action.type === CompActionTypes.UPDATE_NODES_V2) { + const newData = comp.children.data.getView(); + // data changes + if (comp.children.data !== this.children.data) { + setTimeout(() => { + // update x-axis value + const keys = getDataKeys(newData); + if (keys.length > 0 && !keys.includes(comp.children.xAxisKey.getView())) { + comp.children.xAxisKey.dispatch(changeValueAction(keys[0] || "")); + } + if (keys.length > 0 && !keys.includes(comp.children.yAxisKey.getView())) { + comp.children.yAxisKey.dispatch(changeValueAction(keys[1] || "")); + } + }, 0); + } + return this.updateContext(comp); + } + return comp; + } + + override autoHeight(): boolean { + return false; + } +}; + +let Line3DChartComp = withExposingConfigs(Line3DChartTmpComp, [ + depsConfig({ + name: "selectedPoints", + desc: trans("chart.selectedPointsDesc"), + depKeys: ["selectedPoints"], + func: (input) => { + return input.selectedPoints; + }, + }), + depsConfig({ + name: "lastInteractionData", + desc: trans("chart.lastInteractionDataDesc"), + depKeys: ["lastInteractionData"], + func: (input) => { + return input.lastInteractionData; + }, + }), + depsConfig({ + name: "data", + desc: trans("chart.dataDesc"), + depKeys: ["data", "mode"], + func: (input) =>[] , + }), + new NameConfig("title", trans("chart.titleDesc")), +]); + + +export const Line3DChartCompWithDefault = withDefault(Line3DChartComp, { + xAxisKey: "date", +}); diff --git a/client/packages/lowcoder-comps/src/comps/line3dChartComp/line3dChartConstants.tsx b/client/packages/lowcoder-comps/src/comps/line3dChartComp/line3dChartConstants.tsx new file mode 100644 index 000000000..41a405c55 --- /dev/null +++ b/client/packages/lowcoder-comps/src/comps/line3dChartComp/line3dChartConstants.tsx @@ -0,0 +1,176 @@ +import { + jsonControl, + stateComp, + toJSONObjectArray, + toObject, + BoolControl, + ColorControl, + withDefault, + StringControl, + NumberControl, + dropdownControl, + list, + eventHandlerControl, + valueComp, + withType, + uiChildren, + clickEvent, + toArray, + styleControl, + EchartDefaultTextStyle, + EchartDefaultChartStyle, + MultiCompBuilder, +} from "lowcoder-sdk"; +import { RecordConstructorToComp, RecordConstructorToView } from "lowcoder-core"; +import { XAxisConfig, YAxisConfig } from "../basicChartComp/chartConfigs/cartesianAxisConfig"; +import { LegendConfig } from "../basicChartComp/chartConfigs/legendConfig"; +import { EchartsLegendConfig } from "../basicChartComp/chartConfigs/echartsLegendConfig"; +import { EchartsLabelConfig } from "../basicChartComp/chartConfigs/echartsLabelConfig"; +import { EChartsOption } from "echarts"; +import { i18nObjs, trans } from "i18n/comps"; +import {EchartsTitleVerticalConfig} from "../chartComp/chartConfigs/echartsTitleVerticalConfig"; +import {EchartsTitleConfig} from "../basicChartComp/chartConfigs/echartsTitleConfig"; + +export const UIEventOptions = [ + { + label: trans("chart.select"), + value: "select", + description: trans("chart.selectDesc"), + }, + { + label: trans("chart.unSelect"), + value: "unselect", + description: trans("chart.unselectDesc"), + }, +] as const; + +export const XAxisDirectionOptions = [ + { + label: trans("chart.horizontal"), + value: "horizontal", + }, + { + label: trans("chart.vertical"), + value: "vertical", + }, +] as const; + +export type XAxisDirectionType = ValueFromOption; + +export const noDataAxisConfig = { + animation: false, + xAxis: { + type: "category", + name: trans("chart.noData"), + nameLocation: "middle", + data: [], + axisLine: { + lineStyle: { + color: "#8B8FA3", + }, + }, + }, + yAxis: { + type: "value", + axisLabel: { + color: "#8B8FA3", + }, + splitLine: { + lineStyle: { + color: "#F0F0F0", + }, + }, + }, + tooltip: { + show: false, + }, + series: [ + { + data: [700], + type: "line", + itemStyle: { + opacity: 0, + }, + }, + ], +} as EChartsOption; + +export const noDataLine3DChartConfig = { + animation: false, + tooltip: { + show: false, + }, + legend: { + formatter: trans("chart.unknown"), + top: "bottom", + selectedMode: false, + }, + color: ["#B8BBCC", "#CED0D9", "#DCDEE6", "#E6E6EB"], + series: [], +} as EChartsOption; + +export type ChartSize = { w: number; h: number }; + +export const getDataKeys = (data: Array) => { + if (!data) { + return []; + } + const dataKeys: Array = []; + data[0].forEach((key) => { + if (!dataKeys.includes(key)) { + dataKeys.push(key); + } + }); + return dataKeys; +}; + +export const chartUiModeChildren = { + title: withDefault(StringControl, trans("echarts.defaultTitle")), + data: jsonControl(toArray, i18nObjs.defaultDatasource3DGlobe), + xAxisKey: valueComp(""), // x-axis, key from data + xAxisDirection: dropdownControl(XAxisDirectionOptions, "horizontal"), + xAxisData: jsonControl(toArray, []), + yAxisKey: valueComp(""), // x-axis, key from data + xConfig: XAxisConfig, + yConfig: YAxisConfig, + legendConfig: LegendConfig, + environment: withDefault(StringControl, trans("line3dchart.defaultEnvironment")), + baseTexture: withDefault(StringControl, trans("line3dchart.defaultBaseTexture")), + heightTexture: withDefault(StringControl, trans("line3dchart.defaultHeightTexture")), + background: withDefault(ColorControl, "black"), + lineStyleWidth: withDefault(NumberControl, 1), + lineStyleColor: withDefault(ColorControl, "rgb(50, 50, 150)"), + lineStyleOpacity: withDefault(NumberControl, 0.1), + effectShow: withDefault(BoolControl, true), + effectWidth: withDefault(NumberControl, 2), + effectLength: withDefault(NumberControl, 0.15), + effectOpacity: withDefault(NumberControl, 1), + effectColor: withDefault(ColorControl, 'rgb(30, 30, 60)'), + onUIEvent: eventHandlerControl(UIEventOptions), +}; + +export type UIChartDataType = { + seriesName: string; + // coordinate chart + x?: any; + y?: any; + // line3d or funnel + itemName?: any; + value?: any; +}; + +export type NonUIChartDataType = { + name: string; + value: any; +} + +export const line3dChartChildrenMap = { + selectedPoints: stateComp>([]), + lastInteractionData: stateComp | NonUIChartDataType>({}), + onEvent: eventHandlerControl([clickEvent] as const), + ...chartUiModeChildren, +}; + +const chartUiChildrenMap = uiChildren(line3dChartChildrenMap); +export type ChartCompPropsType = RecordConstructorToView; +export type ChartCompChildrenType = RecordConstructorToComp; diff --git a/client/packages/lowcoder-comps/src/comps/line3dChartComp/line3dChartPropertyView.tsx b/client/packages/lowcoder-comps/src/comps/line3dChartComp/line3dChartPropertyView.tsx new file mode 100644 index 000000000..bbcebf358 --- /dev/null +++ b/client/packages/lowcoder-comps/src/comps/line3dChartComp/line3dChartPropertyView.tsx @@ -0,0 +1,62 @@ +import { changeChildAction, CompAction } from "lowcoder-core"; +import { ChartCompChildrenType, getDataKeys } from "./line3dChartConstants"; +import { + CustomModal, + Dropdown, + hiddenPropertyView, + Option, + RedButton, + Section, + sectionNames, + controlItem, +} from "lowcoder-sdk"; +import { trans } from "i18n/comps"; + +export function line3dChartPropertyView( + children: ChartCompChildrenType, + dispatch: (action: CompAction) => void +) { + const uiModePropertyView = ( + <> +
+ {children.environment.propertyView({label: trans("line3dchart.environment")})} + {children.baseTexture.propertyView({label: trans("line3dchart.baseTexture")})} + {children.heightTexture.propertyView({label: trans("line3dchart.heightTexture")})} + {children.background.propertyView({label: trans("line3dchart.background")})} + {children.lineStyleWidth.propertyView({label: trans("line3dchart.lineStyleWidth")})} + {children.lineStyleColor.propertyView({label: trans("line3dchart.lineStyleColor")})} + {children.lineStyleOpacity.propertyView({label: trans("line3dchart.lineStyleOpacity")})} + {children.effectShow.propertyView({label: trans("line3dchart.effectShow")})} + {children.effectShow.getView() && children.effectWidth.propertyView({label: trans("line3dchart.effectTrailWidth")})} + {children.effectShow.getView() && children.effectLength.propertyView({label: trans("line3dchart.effectTrailLength")})} + {children.effectShow.getView() && children.effectOpacity.propertyView({label: trans("line3dchart.effectTrailOpacity")})} + {children.effectShow.getView() && children.effectColor.propertyView({label: trans("line3dchart.effectTrailColor")})} +
+
+
+ {children.onUIEvent.propertyView({title: trans("chart.chartEventHandlers")})} +
+
+ {children.onEvent.propertyView()} +
+
+
+ {children.data.propertyView({ + label: trans("chart.data"), + })} +
+ + ); + + const getChatConfigByMode = (mode: string) => { + switch(mode) { + case "ui": + return uiModePropertyView; + } + } + return ( + <> + {getChatConfigByMode(children.mode.getView())} + + ); +} diff --git a/client/packages/lowcoder-comps/src/comps/line3dChartComp/line3dChartUtils.ts b/client/packages/lowcoder-comps/src/comps/line3dChartComp/line3dChartUtils.ts new file mode 100644 index 000000000..d1be05edf --- /dev/null +++ b/client/packages/lowcoder-comps/src/comps/line3dChartComp/line3dChartUtils.ts @@ -0,0 +1,239 @@ +import { + ChartCompPropsType, + ChartSize, + noDataLine3DChartConfig, +} from "comps/line3dChartComp/line3dChartConstants"; +import { EChartsOptionWithMap } from "../basicChartComp/reactEcharts/types"; +import _ from "lodash"; +import { googleMapsApiUrl } from "../basicChartComp/chartConfigs/chartUrls"; +import parseBackground from "../../util/gradientBackgroundColor"; +import {chartStyleWrapper, styleWrapper} from "../../util/styleWrapper"; +// Define the configuration interface to match the original transform + +interface AggregateConfig { + resultDimensions: Array<{ + name: string; + from: string; + method?: string; // e.g., 'min', 'Q1', 'median', 'Q3', 'max' + }>; + groupBy: string; +} + +// Custom transform function +function customAggregateTransform(params: { + upstream: { source: any[] }; + config: AggregateConfig; +}): any[] { + const { upstream, config } = params; + const data = upstream.source; + + // Assume data is an array of arrays, with the first row as headers + const headers = data[0]; + const rows = data.slice(1); + + // Find the index of the groupBy column + const groupByIndex = headers.indexOf(config.groupBy); + if (groupByIndex === -1) { + return []; + } + + // Group rows by the groupBy column + const groups: { [key: string]: any[][] } = {}; + rows.forEach(row => { + const key = row[groupByIndex]; + if (!groups[key]) { + groups[key] = []; + } + groups[key].push(row); + }); + + // Define aggregation functions + const aggregators: { + [method: string]: (values: number[]) => number; + } = { + min: values => Math.min(...values), + max: values => Math.max(...values), + Q1: values => percentile(values, 25), + median: values => percentile(values, 50), + Q3: values => percentile(values, 75), + }; + + // Helper function to calculate percentiles (Q1, median, Q3) + function percentile(arr: number[], p: number): number { + const sorted = arr.slice().sort((a, b) => a - b); + const index = (p / 100) * (sorted.length - 1); + const i = Math.floor(index); + const f = index - i; + if (i === sorted.length - 1) { + return sorted[i]; + } + return sorted[i] + f * (sorted[i + 1] - sorted[i]); + } + + // Prepare output headers from resultDimensions + const outputHeaders = config.resultDimensions.map(dim => dim.name); + + // Compute aggregated data for each group + const aggregatedData: any[][] = []; + for (const key in groups) { + const groupRows = groups[key]; + const row: any[] = []; + + config.resultDimensions.forEach(dim => { + if (dim.from === config.groupBy) { + // Include the group key directly + row.push(key); + } else { + // Find the index of the 'from' column + const fromIndex = headers.indexOf(dim.from); + if (fromIndex === -1) { + return; + } + // Extract values for the 'from' column in this group + const values = groupRows + .map(r => parseFloat(r[fromIndex])) + .filter(v => !isNaN(v)); + if (dim.method && aggregators[dim.method]) { + // Apply the aggregation method + row.push(aggregators[dim.method](values)); + } else { + return; + } + } + }); + + aggregatedData.push(row); + } + + // Return the transformed data with headers + return [outputHeaders, ...aggregatedData]; +} + +export const echartsConfigOmitChildren = [ + "hidden", + "selectedPoints", + "onUIEvent", + "mapInstance" +] as const; +type EchartsConfigProps = Omit; + +// https://echarts.apache.org/en/option.html +export function getEchartsConfig( + props: EchartsConfigProps, + chartSize?: ChartSize, + theme?: any, +): EChartsOptionWithMap { + let config: any = { + backgroundColor: props.background, + globe: { + environment: props.environment, + baseTexture: props.baseTexture, + heightTexture: props.heightTexture, + shading: 'realistic', + realisticMaterial: { + roughness: 0.2, + metalness: 0 + }, + postEffect: { + enable: true, + depthOfField: { + enable: false, + focalDistance: 150 + } + }, + displacementScale: 0.1, + displacementQuality: 'high', + temporalSuperSampling: { + enable: true + }, + light: { + ambient: { + intensity: 0.4 + }, + main: { + intensity: 0.4 + }, + }, + viewControl: { + autoRotate: false + }, + silent: true + }, + series: { + type: 'lines3D', + coordinateSystem: 'globe', + blendMode: 'lighter', + lineStyle: { + width: props.lineStyleWidth, + color: props.lineStyleColor, + opacity: props.lineStyleOpacity + }, + data: props.data, + effect: { + show: props.effectShow, + trailWidth: props.effectWidth, + trailLength: props.effectLength, + trailOpacity: props.effectOpacity, + trailColor: props.effectColor + }, + } + }; + console.log(config); + return config; +} + +export function getSelectedPoints(param: any, option: any) { + const series = option.series; + const dataSource = _.isArray(option.dataset) && option.dataset[0]?.source; + if (series && dataSource) { + return param.selected.flatMap((selectInfo: any) => { + const seriesInfo = series[selectInfo.seriesIndex]; + if (!seriesInfo || !seriesInfo.encode) { + return []; + } + return selectInfo.dataIndex.map((index: any) => { + const commonResult = { + seriesName: seriesInfo.name, + }; + if (seriesInfo.encode.itemName && seriesInfo.encode.value) { + return { + ...commonResult, + itemName: dataSource[index][seriesInfo.encode.itemName], + value: dataSource[index][seriesInfo.encode.value], + }; + } else { + return { + ...commonResult, + x: dataSource[index][seriesInfo.encode.x], + y: dataSource[index][seriesInfo.encode.y], + }; + } + }); + }); + } + return []; +} + +export function loadGoogleMapsScript(apiKey: string) { + const mapsUrl = `${googleMapsApiUrl}?key=${apiKey}`; + const scripts = document.getElementsByTagName('script'); + // is script already loaded + let scriptIndex = _.findIndex(scripts, (script) => script.src.endsWith(mapsUrl)); + if(scriptIndex > -1) { + return scripts[scriptIndex]; + } + // is script loaded with diff api_key, remove the script and load again + scriptIndex = _.findIndex(scripts, (script) => script.src.startsWith(googleMapsApiUrl)); + if(scriptIndex > -1) { + scripts[scriptIndex].remove(); + } + + const script = document.createElement("script"); + script.type = "text/javascript"; + script.src = mapsUrl; + script.async = true; + script.defer = true; + window.document.body.appendChild(script); + + return script; +} diff --git a/client/packages/lowcoder-comps/src/comps/parallelChartComp/parallelChartComp.tsx b/client/packages/lowcoder-comps/src/comps/parallelChartComp/parallelChartComp.tsx new file mode 100644 index 000000000..84bcf3280 --- /dev/null +++ b/client/packages/lowcoder-comps/src/comps/parallelChartComp/parallelChartComp.tsx @@ -0,0 +1,282 @@ +import { + changeChildAction, + changeValueAction, + CompAction, + CompActionTypes, + wrapChildAction, +} from "lowcoder-core"; +import { AxisFormatterComp, EchartsAxisType } from "../basicChartComp/chartConfigs/cartesianAxisConfig"; +import { parallelChartChildrenMap, ChartSize, getDataKeys } from "./parallelChartConstants"; +import { parallelChartPropertyView } from "./parallelChartPropertyView"; +import _ from "lodash"; +import { useContext, useEffect, useMemo, useRef, useState } from "react"; +import ReactResizeDetector from "react-resize-detector"; +import ReactECharts from "../basicChartComp/reactEcharts"; +import * as echarts from "echarts"; +import { + childrenToProps, + depsConfig, + genRandomKey, + NameConfig, + UICompBuilder, + withDefault, + withExposingConfigs, + withViewFn, + ThemeContext, + chartColorPalette, + getPromiseAfterDispatch, + dropdownControl, +} from "lowcoder-sdk"; +import { getEchartsLocale, i18nObjs, trans } from "i18n/comps"; +import { + echartsConfigOmitChildren, + getEchartsConfig, + getSelectedPoints, +} from "./parallelChartUtils"; +import 'echarts-extension-gmap'; +import log from "loglevel"; + +let clickEventCallback = () => {}; + +const chartModeOptions = [ + { + label: "UI", + value: "ui", + } +] as const; + +let ParallelChartTmpComp = (function () { + return new UICompBuilder({mode:dropdownControl(chartModeOptions,'ui'),...parallelChartChildrenMap}, () => null) + .setPropertyViewFn(parallelChartPropertyView) + .build(); +})(); + +ParallelChartTmpComp = withViewFn(ParallelChartTmpComp, (comp) => { + const mode = comp.children.mode.getView(); + const onUIEvent = comp.children.onUIEvent.getView(); + const onEvent = comp.children.onEvent.getView(); + const echartsCompRef = useRef(); + const [chartSize, setChartSize] = useState(); + const firstResize = useRef(true); + const theme = useContext(ThemeContext); + const defaultChartTheme = { + color: chartColorPalette, + backgroundColor: "#fff", + }; + + let themeConfig = defaultChartTheme; + try { + themeConfig = theme?.theme.chart ? JSON.parse(theme?.theme.chart) : defaultChartTheme; + } catch (error) { + log.error('theme chart error: ', error); + } + + const triggerClickEvent = async (dispatch: any, action: CompAction) => { + await getPromiseAfterDispatch( + dispatch, + action, + { autoHandleAfterReduce: true } + ); + onEvent('click'); + } + + useEffect(() => { + const echartsCompInstance = echartsCompRef?.current?.getEchartsInstance(); + if (!echartsCompInstance) { + return _.noop; + } + echartsCompInstance?.on("click", (param: any) => { + document.dispatchEvent(new CustomEvent("clickEvent", { + bubbles: true, + detail: { + action: 'click', + data: param.data, + } + })); + triggerClickEvent( + comp.dispatch, + changeChildAction("lastInteractionData", param.data, false) + ); + }); + return () => { + echartsCompInstance?.off("click"); + document.removeEventListener('clickEvent', clickEventCallback) + }; + }, []); + + useEffect(() => { + // bind events + const echartsCompInstance = echartsCompRef?.current?.getEchartsInstance(); + if (!echartsCompInstance) { + return _.noop; + } + echartsCompInstance?.on("selectchanged", (param: any) => { + const option: any = echartsCompInstance?.getOption(); + document.dispatchEvent(new CustomEvent("clickEvent", { + bubbles: true, + detail: { + action: param.fromAction, + data: getSelectedPoints(param, option) + } + })); + + if (param.fromAction === "select") { + comp.dispatch(changeChildAction("selectedPoints", getSelectedPoints(param, option), false)); + onUIEvent("select"); + } else if (param.fromAction === "unselect") { + comp.dispatch(changeChildAction("selectedPoints", getSelectedPoints(param, option), false)); + onUIEvent("unselect"); + } + + triggerClickEvent( + comp.dispatch, + changeChildAction("lastInteractionData", getSelectedPoints(param, option), false) + ); + }); + // unbind + return () => { + echartsCompInstance?.off("selectchanged"); + document.removeEventListener('clickEvent', clickEventCallback) + }; + }, [onUIEvent]); + + const echartsConfigChildren = _.omit(comp.children, echartsConfigOmitChildren); + const childrenProps = childrenToProps(echartsConfigChildren); + + const option = useMemo(() => { + return getEchartsConfig( + childrenProps as ToViewReturn, + chartSize, + themeConfig + ); + }, [theme, childrenProps, chartSize, ...Object.values(echartsConfigChildren)]); + + return ( + { + if (w && h) { + setChartSize({ w: w, h: h }); + } + if (!firstResize.current) { + // ignore the first resize, which will impact the loading animation + echartsCompRef.current?.getEchartsInstance().resize(); + } else { + firstResize.current = false; + } + }} + > + (echartsCompRef.current = e)} + style={{ height: "100%" }} + notMerge + lazyUpdate + opts={{ locale: getEchartsLocale() }} + option={option} + mode={mode} + /> + + ); +}); + +function getYAxisFormatContextValue( + data: Array, + yAxisType: EchartsAxisType, + yAxisName?: string +) { + const dataSample = yAxisName && data.length > 0 && data[0][yAxisName]; + let contextValue = dataSample; + if (yAxisType === "time") { + // to timestamp + const time = + typeof dataSample === "number" || typeof dataSample === "string" + ? new Date(dataSample).getTime() + : null; + if (time) contextValue = time; + } + return contextValue; +} + +ParallelChartTmpComp = class extends ParallelChartTmpComp { + private lastYAxisFormatContextVal?: JSONValue; + private lastColorContext?: JSONObject; + + updateContext(comp: this) { + // the context value of axis format + let resultComp = comp; + const data = comp.children.data.getView(); + const yAxisContextValue = getYAxisFormatContextValue( + data, + comp.children.yConfig.children.yAxisType.getView(), + ); + if (yAxisContextValue !== comp.lastYAxisFormatContextVal) { + comp.lastYAxisFormatContextVal = yAxisContextValue; + resultComp = comp.setChild( + "yConfig", + comp.children.yConfig.reduce( + wrapChildAction( + "formatter", + AxisFormatterComp.changeContextDataAction({ value: yAxisContextValue }) + ) + ) + ); + } + return resultComp; + } + + override reduce(action: CompAction): this { + const comp = super.reduce(action); + if (action.type === CompActionTypes.UPDATE_NODES_V2) { + const newData = comp.children.data.getView(); + // data changes + if (comp.children.data !== this.children.data) { + setTimeout(() => { + // update x-axis value + const keys = getDataKeys(newData); + if (keys.length > 0 && !keys.includes(comp.children.xAxisKey.getView())) { + comp.children.xAxisKey.dispatch(changeValueAction(keys[0] || "")); + } + if (keys.length > 0 && !keys.includes(comp.children.yAxisKey.getView())) { + comp.children.yAxisKey.dispatch(changeValueAction(keys[1] || "")); + } + }, 0); + } + return this.updateContext(comp); + } + return comp; + } + + override autoHeight(): boolean { + return false; + } +}; + +let ParallelChartComp = withExposingConfigs(ParallelChartTmpComp, [ + depsConfig({ + name: "selectedPoints", + desc: trans("chart.selectedPointsDesc"), + depKeys: ["selectedPoints"], + func: (input) => { + return input.selectedPoints; + }, + }), + depsConfig({ + name: "lastInteractionData", + desc: trans("chart.lastInteractionDataDesc"), + depKeys: ["lastInteractionData"], + func: (input) => { + return input.lastInteractionData; + }, + }), + depsConfig({ + name: "data", + desc: trans("chart.dataDesc"), + depKeys: ["data", "mode"], + func: (input) =>[] , + }), + new NameConfig("title", trans("chart.titleDesc")), +]); + + +export const ParallelChartCompWithDefault = withDefault(ParallelChartComp, { + xAxisKey: "date", +}); diff --git a/client/packages/lowcoder-comps/src/comps/parallelChartComp/parallelChartConstants.tsx b/client/packages/lowcoder-comps/src/comps/parallelChartComp/parallelChartConstants.tsx new file mode 100644 index 000000000..4b383d645 --- /dev/null +++ b/client/packages/lowcoder-comps/src/comps/parallelChartComp/parallelChartConstants.tsx @@ -0,0 +1,193 @@ +import { + jsonControl, + stateComp, + toJSONObjectArray, + toObject, + BoolControl, + ColorControl, + withDefault, + StringControl, + NumberControl, + dropdownControl, + list, + eventHandlerControl, + valueComp, + withType, + uiChildren, + clickEvent, + toArray, + styleControl, + EchartDefaultTextStyle, + EchartDefaultChartStyle, + MultiCompBuilder, +} from "lowcoder-sdk"; +import { RecordConstructorToComp, RecordConstructorToView } from "lowcoder-core"; +import { XAxisConfig, YAxisConfig } from "../basicChartComp/chartConfigs/cartesianAxisConfig"; +import { LegendConfig } from "../basicChartComp/chartConfigs/legendConfig"; +import { EchartsLegendConfig } from "../basicChartComp/chartConfigs/echartsLegendConfig"; +import { EchartsLabelConfig } from "../basicChartComp/chartConfigs/echartsLabelConfig"; +import { EChartsOption } from "echarts"; +import { i18nObjs, trans } from "i18n/comps"; +import {EchartsTitleVerticalConfig} from "../chartComp/chartConfigs/echartsTitleVerticalConfig"; +import {EchartsTitleConfig} from "../basicChartComp/chartConfigs/echartsTitleConfig"; + +export const UIEventOptions = [ + { + label: trans("chart.select"), + value: "select", + description: trans("chart.selectDesc"), + }, + { + label: trans("chart.unSelect"), + value: "unselect", + description: trans("chart.unselectDesc"), + }, +] as const; + +export const XAxisDirectionOptions = [ + { + label: trans("chart.horizontal"), + value: "horizontal", + }, + { + label: trans("chart.vertical"), + value: "vertical", + }, +] as const; + +export type XAxisDirectionType = ValueFromOption; + +export const noDataAxisConfig = { + animation: false, + xAxis: { + type: "category", + name: trans("chart.noData"), + nameLocation: "middle", + data: [], + axisLine: { + lineStyle: { + color: "#8B8FA3", + }, + }, + }, + yAxis: { + type: "value", + axisLabel: { + color: "#8B8FA3", + }, + splitLine: { + lineStyle: { + color: "#F0F0F0", + }, + }, + }, + tooltip: { + show: false, + }, + series: [ + { + data: [700], + type: "line", + itemStyle: { + opacity: 0, + }, + }, + ], +} as EChartsOption; + +export const noDataParallelChartConfig = { + animation: false, + tooltip: { + show: false, + }, + legend: { + formatter: trans("chart.unknown"), + top: "bottom", + selectedMode: false, + }, + color: ["#B8BBCC", "#CED0D9", "#DCDEE6", "#E6E6EB"], + series: [], +} as EChartsOption; + +export type ChartSize = { w: number; h: number }; + +export const getDataKeys = (data: Array) => { + if (!data) { + return []; + } + const dataKeys: Array = []; + data[0].forEach((key) => { + if (!dataKeys.includes(key)) { + dataKeys.push(key); + } + }); + return dataKeys; +}; + +export const chartUiModeChildren = { + title: withDefault(StringControl, trans("echarts.defaultTitle")), + data: jsonControl(toArray, i18nObjs.defaultDatasourceParallel), + xAxisKey: valueComp(""), // x-axis, key from data + xAxisDirection: dropdownControl(XAxisDirectionOptions, "horizontal"), + xAxisData: jsonControl(toArray, []), + yAxisKey: valueComp(""), // x-axis, key from data + xConfig: XAxisConfig, + yConfig: YAxisConfig, + legendConfig: LegendConfig, + onUIEvent: eventHandlerControl(UIEventOptions), +}; + +let chartJsonModeChildren: any = { + echartsOption: jsonControl(toObject, i18nObjs.defaultEchartsJsonOption), + echartsTitle: withDefault(StringControl, trans("echarts.defaultTitle")), + echartsLegendConfig: EchartsLegendConfig, + echartsLabelConfig: EchartsLabelConfig, + echartsTitleVerticalConfig: EchartsTitleVerticalConfig, + echartsTitleConfig:EchartsTitleConfig, + + left:withDefault(NumberControl,trans('chart.defaultLeft')), + right:withDefault(NumberControl,trans('chart.defaultRight')), + top:withDefault(NumberControl,trans('chart.defaultTop')), + bottom:withDefault(NumberControl,trans('chart.defaultBottom')), + + tooltip: withDefault(BoolControl, true), + legendVisibility: withDefault(BoolControl, true), +} + +if (EchartDefaultChartStyle && EchartDefaultTextStyle) { + chartJsonModeChildren = { + ...chartJsonModeChildren, + chartStyle: styleControl(EchartDefaultChartStyle, 'chartStyle'), + titleStyle: styleControl(EchartDefaultTextStyle, 'titleStyle'), + xAxisStyle: styleControl(EchartDefaultTextStyle, 'xAxis'), + yAxisStyle: styleControl(EchartDefaultTextStyle, 'yAxisStyle'), + legendStyle: styleControl(EchartDefaultTextStyle, 'legendStyle'), + } +} + +export type UIChartDataType = { + seriesName: string; + // coordinate chart + x?: any; + y?: any; + // parallel or funnel + itemName?: any; + value?: any; +}; + +export type NonUIChartDataType = { + name: string; + value: any; +} + +export const parallelChartChildrenMap = { + selectedPoints: stateComp>([]), + lastInteractionData: stateComp | NonUIChartDataType>({}), + onEvent: eventHandlerControl([clickEvent] as const), + ...chartUiModeChildren, + ...chartJsonModeChildren, +}; + +const chartUiChildrenMap = uiChildren(parallelChartChildrenMap); +export type ChartCompPropsType = RecordConstructorToView; +export type ChartCompChildrenType = RecordConstructorToComp; diff --git a/client/packages/lowcoder-comps/src/comps/parallelChartComp/parallelChartPropertyView.tsx b/client/packages/lowcoder-comps/src/comps/parallelChartComp/parallelChartPropertyView.tsx new file mode 100644 index 000000000..3106c44d7 --- /dev/null +++ b/client/packages/lowcoder-comps/src/comps/parallelChartComp/parallelChartPropertyView.tsx @@ -0,0 +1,70 @@ +import { changeChildAction, CompAction } from "lowcoder-core"; +import { ChartCompChildrenType, getDataKeys } from "./parallelChartConstants"; +import { + CustomModal, + Dropdown, + hiddenPropertyView, + Option, + RedButton, + Section, + sectionNames, + controlItem, +} from "lowcoder-sdk"; +import { trans } from "i18n/comps"; + +export function parallelChartPropertyView( + children: ChartCompChildrenType, + dispatch: (action: CompAction) => void +) { + const columnOptions = getDataKeys(children.data.getView()).map((key) => ({ + label: key, + value: key, + })); + + const uiModePropertyView = ( + <> +
+
+ {children.onUIEvent.propertyView({title: trans("chart.chartEventHandlers")})} +
+
+ {children.onEvent.propertyView()} +
+
+
+ {children.echartsTitleConfig.getPropertyView()} + {children.echartsTitleVerticalConfig.getPropertyView()} + {children.title.propertyView({ label: trans("chart.title") })} + {children.left.propertyView({ label: trans("chart.left"), tooltip: trans("echarts.leftTooltip") })} + {children.right.propertyView({ label: trans("chart.right"), tooltip: trans("echarts.rightTooltip") })} + {children.top.propertyView({ label: trans("chart.top"), tooltip: trans("echarts.topTooltip") })} + {children.bottom.propertyView({ label: trans("chart.bottom"), tooltip: trans("echarts.bottomTooltip") })} + {hiddenPropertyView(children)} + {children.tooltip.propertyView({label: trans("echarts.tooltip"), tooltip: trans("echarts.tooltipTooltip")})} +
+
+ {children.chartStyle?.getPropertyView()} +
+
+ {children.titleStyle?.getPropertyView()} +
+
+ {children.data.propertyView({ + label: trans("chart.data"), + })} +
+ + ); + + const getChatConfigByMode = (mode: string) => { + switch(mode) { + case "ui": + return uiModePropertyView; + } + } + return ( + <> + {getChatConfigByMode(children.mode.getView())} + + ); +} diff --git a/client/packages/lowcoder-comps/src/comps/parallelChartComp/parallelChartUtils.ts b/client/packages/lowcoder-comps/src/comps/parallelChartComp/parallelChartUtils.ts new file mode 100644 index 000000000..407a2df69 --- /dev/null +++ b/client/packages/lowcoder-comps/src/comps/parallelChartComp/parallelChartUtils.ts @@ -0,0 +1,241 @@ +import { + ChartCompPropsType, + ChartSize, + noDataParallelChartConfig, +} from "comps/parallelChartComp/parallelChartConstants"; +import { EChartsOptionWithMap } from "../basicChartComp/reactEcharts/types"; +import _ from "lodash"; +import { googleMapsApiUrl } from "../basicChartComp/chartConfigs/chartUrls"; +import parseBackground from "../../util/gradientBackgroundColor"; +import {chartStyleWrapper, styleWrapper} from "../../util/styleWrapper"; +// Define the configuration interface to match the original transform + +interface AggregateConfig { + resultDimensions: Array<{ + name: string; + from: string; + method?: string; // e.g., 'min', 'Q1', 'median', 'Q3', 'max' + }>; + groupBy: string; +} + +// Custom transform function +function customAggregateTransform(params: { + upstream: { source: any[] }; + config: AggregateConfig; +}): any[] { + const { upstream, config } = params; + const data = upstream.source; + + // Assume data is an array of arrays, with the first row as headers + const headers = data[0]; + const rows = data.slice(1); + + // Find the index of the groupBy column + const groupByIndex = headers.indexOf(config.groupBy); + if (groupByIndex === -1) { + return []; + } + + // Group rows by the groupBy column + const groups: { [key: string]: any[][] } = {}; + rows.forEach(row => { + const key = row[groupByIndex]; + if (!groups[key]) { + groups[key] = []; + } + groups[key].push(row); + }); + + // Define aggregation functions + const aggregators: { + [method: string]: (values: number[]) => number; + } = { + min: values => Math.min(...values), + max: values => Math.max(...values), + Q1: values => percentile(values, 25), + median: values => percentile(values, 50), + Q3: values => percentile(values, 75), + }; + + // Helper function to calculate percentiles (Q1, median, Q3) + function percentile(arr: number[], p: number): number { + const sorted = arr.slice().sort((a, b) => a - b); + const index = (p / 100) * (sorted.length - 1); + const i = Math.floor(index); + const f = index - i; + if (i === sorted.length - 1) { + return sorted[i]; + } + return sorted[i] + f * (sorted[i + 1] - sorted[i]); + } + + // Prepare output headers from resultDimensions + const outputHeaders = config.resultDimensions.map(dim => dim.name); + + // Compute aggregated data for each group + const aggregatedData: any[][] = []; + for (const key in groups) { + const groupRows = groups[key]; + const row: any[] = []; + + config.resultDimensions.forEach(dim => { + if (dim.from === config.groupBy) { + // Include the group key directly + row.push(key); + } else { + // Find the index of the 'from' column + const fromIndex = headers.indexOf(dim.from); + if (fromIndex === -1) { + return; + } + // Extract values for the 'from' column in this group + const values = groupRows + .map(r => parseFloat(r[fromIndex])) + .filter(v => !isNaN(v)); + if (dim.method && aggregators[dim.method]) { + // Apply the aggregation method + row.push(aggregators[dim.method](values)); + } else { + return; + } + } + }); + + aggregatedData.push(row); + } + + // Return the transformed data with headers + return [outputHeaders, ...aggregatedData]; +} + +export const echartsConfigOmitChildren = [ + "hidden", + "selectedPoints", + "onUIEvent", + "mapInstance" +] as const; +type EchartsConfigProps = Omit; + +// https://echarts.apache.org/en/option.html +export function getEchartsConfig( + props: EchartsConfigProps, + chartSize?: ChartSize, + theme?: any, +): EChartsOptionWithMap { + const gridPos = { + left: `${props?.left}%`, + right: `${props?.right}%`, + bottom: `${props?.bottom}%`, + top: `${props?.top}%`, + }; + + let config: any = { + title: { + text: props.title, + top: props.echartsTitleVerticalConfig.top, + left:props.echartsTitleConfig.top, + textStyle: { + ...styleWrapper(props?.titleStyle, theme?.titleStyle) + } + }, + backgroundColor: parseBackground( props?.chartStyle?.background || theme?.chartStyle?.backgroundColor || "#FFFFFF"), + tooltip: props.tooltip && { + trigger: "axis", + axisPointer: { + type: "line", + lineStyle: { + color: "rgba(0,0,0,0.2)", + width: 2, + type: "solid" + } + } + }, + grid: { + ...gridPos, + containLabel: true, + }, + }; + + if (props.data.length <= 0) { + // no data + return { + ...config, + ...noDataParallelChartConfig, + }; + } + // y-axis is category and time, data doesn't need to aggregate + let transformedData = props.data; + + config = { + ...config, + series: [{ + name: 'parallel', + type: 'parallel', + lineStyle: { + width: 4 + }, + data: props.data.slice(1) + }], + parallelAxis: props.data[0].map((c, i) => ({ dim: i, name: c, type: typeof props.data[1][i] === 'string'?'category':'value'})) + }; + + console.log("Echarts transformedData and config", transformedData, config); + return config; +} + +export function getSelectedPoints(param: any, option: any) { + const series = option.series; + const dataSource = _.isArray(option.dataset) && option.dataset[0]?.source; + if (series && dataSource) { + return param.selected.flatMap((selectInfo: any) => { + const seriesInfo = series[selectInfo.seriesIndex]; + if (!seriesInfo || !seriesInfo.encode) { + return []; + } + return selectInfo.dataIndex.map((index: any) => { + const commonResult = { + seriesName: seriesInfo.name, + }; + if (seriesInfo.encode.itemName && seriesInfo.encode.value) { + return { + ...commonResult, + itemName: dataSource[index][seriesInfo.encode.itemName], + value: dataSource[index][seriesInfo.encode.value], + }; + } else { + return { + ...commonResult, + x: dataSource[index][seriesInfo.encode.x], + y: dataSource[index][seriesInfo.encode.y], + }; + } + }); + }); + } + return []; +} + +export function loadGoogleMapsScript(apiKey: string) { + const mapsUrl = `${googleMapsApiUrl}?key=${apiKey}`; + const scripts = document.getElementsByTagName('script'); + // is script already loaded + let scriptIndex = _.findIndex(scripts, (script) => script.src.endsWith(mapsUrl)); + if(scriptIndex > -1) { + return scripts[scriptIndex]; + } + // is script loaded with diff api_key, remove the script and load again + scriptIndex = _.findIndex(scripts, (script) => script.src.startsWith(googleMapsApiUrl)); + if(scriptIndex > -1) { + scripts[scriptIndex].remove(); + } + + const script = document.createElement("script"); + script.type = "text/javascript"; + script.src = mapsUrl; + script.async = true; + script.defer = true; + window.document.body.appendChild(script); + + return script; +} diff --git a/client/packages/lowcoder-comps/src/comps/pieChartComp/pieChartPropertyView.tsx b/client/packages/lowcoder-comps/src/comps/pieChartComp/pieChartPropertyView.tsx index 7c74958e3..626a491c0 100644 --- a/client/packages/lowcoder-comps/src/comps/pieChartComp/pieChartPropertyView.tsx +++ b/client/packages/lowcoder-comps/src/comps/pieChartComp/pieChartPropertyView.tsx @@ -119,12 +119,6 @@ export function pieChartPropertyView(
{children.titleStyle?.getPropertyView()}
-
- {children.xAxisStyle?.getPropertyView()} -
-
- {children.yAxisStyle?.getPropertyView()} -
{children.legendStyle?.getPropertyView()}
diff --git a/client/packages/lowcoder-comps/src/comps/pieChartComp/pieChartUtils.ts b/client/packages/lowcoder-comps/src/comps/pieChartComp/pieChartUtils.ts index 1d434d2b3..895d27f1d 100644 --- a/client/packages/lowcoder-comps/src/comps/pieChartComp/pieChartUtils.ts +++ b/client/packages/lowcoder-comps/src/comps/pieChartComp/pieChartUtils.ts @@ -128,7 +128,7 @@ export function getSeriesConfig(props: EchartsConfigProps) { } } } - config.radius = s.radius; + if(props.chartConfig.subtype !== "doughnutPie") config.radius = s.radius; if(s.left!="" && s.top!="") { config.center = [s.left, s.top]; } @@ -252,7 +252,7 @@ export function getEchartsConfig( }, itemStyle: { ...series.itemStyle, - // ...chartStyleWrapper(props?.chartStyle, theme?.chartStyle) + ...chartStyleWrapper(props?.chartStyle, theme?.chartStyle) }, lineStyle: { ...chartStyleWrapper(props?.chartStyle, theme?.chartStyle) diff --git a/client/packages/lowcoder-comps/src/comps/scatterChartComp/scatterChartUtils.ts b/client/packages/lowcoder-comps/src/comps/scatterChartComp/scatterChartUtils.ts index cd4292a05..67b2a4a53 100644 --- a/client/packages/lowcoder-comps/src/comps/scatterChartComp/scatterChartUtils.ts +++ b/client/packages/lowcoder-comps/src/comps/scatterChartComp/scatterChartUtils.ts @@ -187,10 +187,16 @@ export function getEchartsConfig( }, axisLine: { show: props.chartConfig.boundaryGap, + }, + axisLabel: { + ...styleWrapper(props?.xAxisStyle, theme?.xAxisStyle, 11) } }, yAxis: { type: "category", + axisLabel: { + ...styleWrapper(props?.yAxisStyle, theme?.yAxisStyle, 11) + } }, }; @@ -222,7 +228,7 @@ export function getEchartsConfig( ...series, itemStyle: { ...series.itemStyle, - // ...chartStyleWrapper(props?.chartStyle, theme?.chartStyle) + ...chartStyleWrapper(props?.chartStyle, theme?.chartStyle) }, lineStyle: { ...chartStyleWrapper(props?.chartStyle, theme?.chartStyle) diff --git a/client/packages/lowcoder-comps/src/i18n/comps/locales/en.ts b/client/packages/lowcoder-comps/src/i18n/comps/locales/en.ts index eb94bb68a..73c3d7d21 100644 --- a/client/packages/lowcoder-comps/src/i18n/comps/locales/en.ts +++ b/client/packages/lowcoder-comps/src/i18n/comps/locales/en.ts @@ -1,3 +1,7 @@ +import {default as defaultBaseTexture} from '../../../comps/line3dChartComp/images/default_base_texture.jpg'; +import {default as defaultHeightTexture} from '../../../comps/line3dChartComp/images/default_height_texture.jpg'; +import {default as defaultEnvironment} from '../../../comps/line3dChartComp/images/default_environment.jpg'; + export const en = { calendarChart: { calendarType: 'Calendar Chart Type', @@ -544,6 +548,24 @@ export const en = { tooltipTooltip: "Show or hide the Tooltip of the Chart.", labelVisibility: "Label", }, + line3dchart: { + background: "Background", + lineStyleWidth: "Line Style Width", + lineStyleColor: "Line Style Color", + lineStyleOpacity: "Line Style Opacity", + effectShow: "Show Effects", + effectTrailWidth: "Trail Width", + effectTrailLength: "Trail Length", + effectTrailOpacity: "Trail Opacity", + effectTrailColor: "Trail Color", + environment: "Environment", + baseTexture: "Base Texture", + heightTexture: "Height Texture", + ambientCubemapTexture: "Ambient Cubemap Texture", + defaultBaseTexture: defaultBaseTexture, + defaultEnvironment: defaultEnvironment, + defaultHeightTexture: defaultHeightTexture, + }, chart: { delete: "Delete", data: "Data", @@ -553,6 +575,7 @@ export const en = { UIMode: "UI Mode", chartType: "Chart Type", xAxis: "X-axis", + yAxis: "Y-axis", chartSeries: "Chart Series", customSeries: "Custom Series", add: "Add", diff --git a/client/packages/lowcoder-comps/src/i18n/comps/locales/enObj.tsx b/client/packages/lowcoder-comps/src/i18n/comps/locales/enObj.tsx index 1604be215..b9d17e3c2 100644 --- a/client/packages/lowcoder-comps/src/i18n/comps/locales/enObj.tsx +++ b/client/packages/lowcoder-comps/src/i18n/comps/locales/enObj.tsx @@ -615,5 +615,1392 @@ export const enObj: I18nObjects = { {"type":"Feature","id":"55","properties":{"name":"Wisconsin"},"geometry":{"type":"Polygon","coordinates":[[[-90.415429,46.568478],[-90.229213,46.508231],[-90.119674,46.338446],[-89.09001,46.135799],[-88.662808,45.987922],[-88.531362,46.020784],[-88.10416,45.922199],[-87.989145,45.796229],[-87.781021,45.675736],[-87.791975,45.500474],[-87.885083,45.363551],[-87.649574,45.341643],[-87.742682,45.199243],[-87.589328,45.095181],[-87.627666,44.974688],[-87.819359,44.95278],[-87.983668,44.722749],[-88.043914,44.563917],[-87.928898,44.536533],[-87.775544,44.640595],[-87.611236,44.837764],[-87.403112,44.914442],[-87.238804,45.166381],[-87.03068,45.22115],[-87.047111,45.089704],[-87.189511,44.969211],[-87.468835,44.552964],[-87.545512,44.322932],[-87.540035,44.158624],[-87.644097,44.103854],[-87.737205,43.8793],[-87.704344,43.687607],[-87.791975,43.561637],[-87.912467,43.249452],[-87.885083,43.002989],[-87.76459,42.783912],[-87.802929,42.493634],[-88.788778,42.493634],[-90.639984,42.510065],[-90.711184,42.636034],[-91.067185,42.75105],[-91.143862,42.909881],[-91.176724,43.134436],[-91.056231,43.254929],[-91.204109,43.353514],[-91.215062,43.501391],[-91.269832,43.616407],[-91.242447,43.775238],[-91.43414,43.994316],[-91.592971,44.032654],[-91.877772,44.202439],[-91.927065,44.333886],[-92.233773,44.443425],[-92.337835,44.552964],[-92.545959,44.569394],[-92.808852,44.750133],[-92.737652,45.117088],[-92.75956,45.286874],[-92.644544,45.440228],[-92.770513,45.566198],[-92.885529,45.577151],[-92.869098,45.719552],[-92.639067,45.933153],[-92.354266,46.015307],[-92.29402,46.075553],[-92.29402,46.667063],[-92.091373,46.749217],[-92.014696,46.705401],[-91.790141,46.694447],[-91.09457,46.864232],[-90.837154,46.95734],[-90.749522,46.88614],[-90.886446,46.754694],[-90.55783,46.584908],[-90.415429,46.568478]]]}}, {"type":"Feature","id":"56","properties":{"name":"Wyoming"},"geometry":{"type":"Polygon","coordinates":[[[-109.080842,45.002073],[-105.91517,45.002073],[-104.058488,44.996596],[-104.053011,43.002989],[-104.053011,41.003906],[-105.728954,40.998429],[-107.919731,41.003906],[-109.04798,40.998429],[-111.047063,40.998429],[-111.047063,42.000709],[-111.047063,44.476286],[-111.05254,45.002073],[-109.080842,45.002073]]]}}, {"type":"Feature","id":"72","properties":{"name":"Puerto Rico"},"geometry":{"type":"Polygon","coordinates":[[[-66.448338,17.984326],[-66.771478,18.006234],[-66.924832,17.929556],[-66.985078,17.973372],[-67.209633,17.956941],[-67.154863,18.19245],[-67.269879,18.362235],[-67.094617,18.515589],[-66.957694,18.488204],[-66.409999,18.488204],[-65.840398,18.433435],[-65.632274,18.367712],[-65.626797,18.203403],[-65.730859,18.186973],[-65.834921,18.017187],[-66.234737,17.929556],[-66.448338,17.984326]]]}} - ]} + ]}, + defaultDatasourceBoxplot: [ + ["Income", "Life Expectancy", "Population", "Country", "Year"], + [815, 34.05, 351014, "Australia", 1800], + [1314, 39, 645526, "Canada", 1800], + [985, 32, 321675013, "China", 1800], + [864, 32.2, 345043, "Cuba", 1800], + [1244, 36.5731262, 977662, "Finland", 1800], + [1803, 33.96717024, 29355111, "France", 1800], + [1639, 38.37, 22886919, "Germany", 1800], + [926, 42.84559912, 61428, "Iceland", 1800], + [1052, 25.4424, 168574895, "India", 1800], + [1050, 36.4, 30294378, "Japan", 1800], + [658, 34.05, 100000, "New Zealand", 1800], + [1278, 37.91620899, 868570, "Norway", 1800], + [1213, 35.9, 9508747, "Poland", 1800], + [1430, 29.5734572, 31088398, "Russia", 1800], + [1221, 35, 9773456, "Turkey", 1800], + [3431, 38.6497603, 12327466, "United Kingdom", 1800], + [2128, 39.41, 6801854, "United States", 1800], + [834, 34.05, 342440, "Australia", 1810], + [1400, 39.01496774, 727603, "Canada", 1810], + [985, 32, 350542958, "China", 1810], + [970, 33.64, 470176, "Cuba", 1810], + [1267, 36.9473378, 1070625, "Finland", 1810], + [1839, 37.4, 30293172, "France", 1810], + [1759, 38.37, 23882461, "Germany", 1810], + [928, 43.13915533, 61428, "Iceland", 1810], + [1051, 25.4424, 171940819, "India", 1810], + [1064, 36.40397538, 30645903, "Japan", 1810], + [659, 34.05, 100000, "New Zealand", 1810], + [1299, 36.47500606, 918398, "Norway", 1810], + [1260, 35.9, 9960687, "Poland", 1810], + [1447, 29.5734572, 31088398, "Russia", 1810], + [1223, 35, 9923007, "Turkey", 1810], + [3575, 38.34738144, 14106058, "United Kingdom", 1810], + [2283, 39.41, 8294928, "United States", 1810], + [853, 34.05, 334002, "Australia", 1820], + [1491, 39.02993548, 879432, "Canada", 1820], + [985, 32, 380055273, "China", 1820], + [1090, 35.04, 607664, "Cuba", 1820], + [1290, 37.29122269, 1190807, "Finland", 1820], + [1876, 39.21, 31549988, "France", 1820], + [1887, 38.37, 25507768, "Germany", 1820], + [929, 36.56365268, 62498, "Iceland", 1820], + [1050, 25.4424, 176225709, "India", 1820], + [1079, 36.40795077, 30993147, "Japan", 1820], + [660, 34.05, 100000, "New Zealand", 1820], + [1320, 46.96239815, 995904, "Norway", 1820], + [1309, 35.9, 10508375, "Poland", 1820], + [1464, 29.5734572, 31861526, "Russia", 1820], + [1225, 35, 10118315, "Turkey", 1820], + [3403, 41.31247671, 16221883, "United Kingdom", 1820], + [2242, 39.41, 10361646, "United States", 1820], + [1399, 34.05, 348143, "Australia", 1830], + [1651, 39.04490323, 1202146, "Canada", 1830], + [986, 32, 402373519, "China", 1830], + [1224, 35.74, 772812, "Cuba", 1830], + [1360, 36.29644969, 1327905, "Finland", 1830], + [1799, 39.56, 33174810, "France", 1830], + [2024, 38.37, 28016571, "Germany", 1830], + [1036, 40.5022162, 65604, "Iceland", 1830], + [1052, 25.4424, 182214537, "India", 1830], + [1094, 36.41192615, 31330455, "Japan", 1830], + [661, 34.05, 91723, "New Zealand", 1830], + [1403, 45.75400094, 1115667, "Norway", 1830], + [1360, 35.9, 11232857, "Poland", 1830], + [1562, 29.5734572, 34134430, "Russia", 1830], + [1292, 35, 10398375, "Turkey", 1830], + [3661, 43.01830917, 18533999, "United Kingdom", 1830], + [2552, 39.41, 13480460, "United States", 1830], + [2269, 34.05, 434095, "Australia", 1840], + [1922, 40.19012, 1745604, "Canada", 1840], + [986, 32, 411213424, "China", 1840], + [1374, 36.48, 975565, "Cuba", 1840], + [1434, 41.46900965, 1467238, "Finland", 1840], + [2184, 40.37, 34854476, "France", 1840], + [2102, 38.37, 31016143, "Germany", 1840], + [1155, 31.97, 70010, "Iceland", 1840], + [1053, 25.4424, 189298397, "India", 1840], + [1110, 36.41590154, 31663783, "Japan", 1840], + [662, 34.05, 82479, "New Zealand", 1840], + [1604, 45.61661054, 1252476, "Norway", 1840], + [1413, 35.9, 12090161, "Poland", 1840], + [1666, 29.5734572, 37420913, "Russia", 1840], + [1362, 35, 10731241, "Turkey", 1840], + [4149, 39.92715263, 20737251, "United Kingdom", 1840], + [2792, 39.41, 17942443, "United States", 1840], + [3267, 34.05, 742619, "Australia", 1850], + [2202, 40.985432, 2487811, "Canada", 1850], + [985, 32, 402711280, "China", 1850], + [1543, 36.26, 1181650, "Cuba", 1850], + [1512, 37.35415172, 1607810, "Finland", 1850], + [2146, 43.28, 36277905, "France", 1850], + [2182, 38.37, 33663143, "Germany", 1850], + [1287, 36.61, 74711, "Iceland", 1850], + [1055, 25.4424, 196657653, "India", 1850], + [1125, 36.41987692, 32223184, "Japan", 1850], + [1898, 34.05, 94934, "New Zealand", 1850], + [1675, 49.53, 1401619, "Norway", 1850], + [1468, 35.9, 13219914, "Poland", 1850], + [1778, 29.5734572, 41023821, "Russia", 1850], + [1436, 35, 11074762, "Turkey", 1850], + [4480, 42.8, 22623571, "United Kingdom", 1850], + [3059, 39.41, 24136293, "United States", 1850], + [4795, 34.05, 1256048, "Australia", 1860], + [2406, 41.541504, 3231465, "Canada", 1860], + [1023, 28.85, 380047548, "China", 1860], + [1733, 36.24, 1324000, "Cuba", 1860], + [1594, 38.15099864, 1734254, "Finland", 1860], + [3086, 43.33, 37461341, "France", 1860], + [2509, 38.37, 36383150, "Germany", 1860], + [1435, 19.76, 79662, "Iceland", 1860], + [1056, 23, 204966302, "India", 1860], + [1168, 36.42385231, 33176900, "Japan", 1860], + [3674, 34.05, 157114, "New Zealand", 1860], + [2033, 50, 1580366, "Norway", 1860], + [1525, 35.9, 14848599, "Poland", 1860], + [1896, 29.5734572, 44966686, "Russia", 1860], + [1514, 35, 11428718, "Turkey", 1860], + [5268, 43.01, 24783522, "United Kingdom", 1860], + [3714, 39.41, 31936643, "United States", 1860], + [5431, 34.05, 1724213, "Australia", 1870], + [2815, 42.460624, 3817167, "Canada", 1870], + [1099, 31.95714286, 363661158, "China", 1870], + [1946, 29.66, 1424672, "Cuba", 1870], + [1897, 45.66140699, 1847468, "Finland", 1870], + [3297, 36.41, 38170355, "France", 1870], + [2819, 38.37, 39702235, "Germany", 1870], + [1599, 38.37, 84941, "Iceland", 1870], + [1058, 25.4424, 213725049, "India", 1870], + [1213, 36.59264, 34638021, "Japan", 1870], + [5156, 34.05, 301045, "New Zealand", 1870], + [2483, 50.86, 1746718, "Norway", 1870], + [1584, 35.9, 17013787, "Poland", 1870], + [2023, 31.12082604, 49288504, "Russia", 1870], + [1597, 35, 11871788, "Turkey", 1870], + [6046, 40.95, 27651628, "United Kingdom", 1870], + [4058, 39.41, 40821569, "United States", 1870], + [7120, 39.34215686, 2253007, "Australia", 1880], + [3021, 44.512464, 4360348, "Canada", 1880], + [1015, 32, 365544192, "China", 1880], + [2185, 36.84, 1555081, "Cuba", 1880], + [1925, 39.67, 2047577, "Finland", 1880], + [3555, 42.73, 39014053, "France", 1880], + [3057, 38.905, 43577358, "Germany", 1880], + [2035, 42.32, 90546, "Iceland", 1880], + [1084, 25.4424, 223020377, "India", 1880], + [1395, 37.03648, 36826469, "Japan", 1880], + [6241, 38.51282051, 505065, "New Zealand", 1880], + [2827, 51.91, 1883716, "Norway", 1880], + [1848, 35.9, 19669587, "Poland", 1880], + [2158, 30.20106663, 53996807, "Russia", 1880], + [1535, 35, 12474351, "Turkey", 1880], + [6553, 43.78, 30849957, "United Kingdom", 1880], + [5292, 39.41, 51256498, "United States", 1880], + [7418, 44.63431373, 3088808, "Australia", 1890], + [3963, 45.12972, 4908078, "Canada", 1890], + [918, 32, 377135349, "China", 1890], + [2454, 39.54, 1658274, "Cuba", 1890], + [2305, 44.61, 2358344, "Finland", 1890], + [3639, 43.36, 40015501, "France", 1890], + [3733, 40.91, 48211294, "Germany", 1890], + [2009, 36.58, 96517, "Iceland", 1890], + [1163, 24.384, 232819584, "India", 1890], + [1606, 37.67568, 39878734, "Japan", 1890], + [6265, 42.97564103, 669985, "New Zealand", 1890], + [3251, 48.6, 2003954, "Norway", 1890], + [2156, 37.41086957, 22618933, "Poland", 1890], + [2233, 29.93047652, 59151534, "Russia", 1890], + [1838, 35, 13188522, "Turkey", 1890], + [7169, 44.75, 34215580, "United Kingdom", 1890], + [5646, 45.21, 63810074, "United States", 1890], + [6688, 49.92647059, 3743708, "Australia", 1900], + [4858, 48.288448, 5530806, "Canada", 1900], + [894, 32, 395184556, "China", 1900], + [2756, 33.11248, 1762227, "Cuba", 1900], + [2789, 41.8, 2633389, "Finland", 1900], + [4314, 45.08, 40628638, "France", 1900], + [4596, 43.915, 55293434, "Germany", 1900], + [2352, 46.64, 102913, "Iceland", 1900], + [1194, 18.35, 243073946, "India", 1900], + [1840, 38.6, 44040263, "Japan", 1900], + [7181, 47.43846154, 815519, "New Zealand", 1900], + [3643, 53.47, 2214923, "Norway", 1900], + [2583, 40.4326087, 24700965, "Poland", 1900], + [3087, 30.74960789, 64836675, "Russia", 1900], + [1985, 35, 13946634, "Turkey", 1900], + [8013, 46.32, 37995759, "United Kingdom", 1900], + [6819, 48.92818182, 77415610, "United States", 1900], + [8695, 55.21862745, 4408209, "Australia", 1910], + [6794, 52.123024, 7181200, "Canada", 1910], + [991, 32, 417830774, "China", 1910], + [3095, 35.21936, 2268558, "Cuba", 1910], + [3192, 48.53, 2930441, "Finland", 1910], + [4542, 51.37, 41294572, "France", 1910], + [5162, 48.40833333, 64064129, "Germany", 1910], + [3012, 52.67, 109714, "Iceland", 1910], + [1391, 23.18032, 253761202, "India", 1910], + [1998, 39.9736, 49314848, "Japan", 1910], + [8896, 51.90128205, 1044340, "New Zealand", 1910], + [4332, 57.99, 2383631, "Norway", 1910], + [2846, 43.45434783, 26493422, "Poland", 1910], + [3487, 31.40217766, 71044207, "Russia", 1910], + [2144, 35, 14746479, "Turkey", 1910], + [8305, 53.99, 41804912, "United Kingdom", 1910], + [8287, 51.8, 93559186, "United States", 1910], + [7867, 60.51078431, 5345428, "Australia", 1920], + [6430, 56.569064, 8764205, "Canada", 1920], + [1012, 32, 462750597, "China", 1920], + [4042, 37.38208, 3067116, "Cuba", 1920], + [3097, 47.55, 3140763, "Finland", 1920], + [4550, 51.6, 39069937, "France", 1920], + [4482, 53.5, 62277173, "Germany", 1920], + [2514, 54.58, 117013, "Iceland", 1920], + [1197, 24.71866667, 267795301, "India", 1920], + [2496, 42.04432, 55545937, "Japan", 1920], + [9453, 56.36410256, 1236395, "New Zealand", 1920], + [5483, 58.89, 2634635, "Norway", 1920], + [3276, 46.47608696, 24166006, "Poland", 1920], + [1489, 20.5, 77871987, "Russia", 1920], + [1525, 29, 14200404, "Turkey", 1920], + [8316, 56.6, 43825720, "United Kingdom", 1920], + [9181, 55.4, 108441644, "United States", 1920], + [7714, 64.998, 6473803, "Australia", 1930], + [7976, 58.94, 10450983, "Canada", 1930], + [1055, 33.26984, 481222579, "China", 1930], + [5027, 42.03308, 3918827, "Cuba", 1930], + [4489, 54.438, 3450505, "Finland", 1930], + [6835, 56.938, 41662571, "France", 1930], + [6791, 59.4991686, 66439556, "Germany", 1930], + [4444, 60.228, 124871, "Iceland", 1930], + [1244, 28.8016, 285470839, "India", 1930], + [2592, 46.65403, 63863524, "Japan", 1930], + [8359, 60.86092308, 1491937, "New Zealand", 1930], + [7369, 64.074, 2807922, "Norway", 1930], + [3591, 49.52382609, 28169922, "Poland", 1930], + [3779, 36.428, 85369549, "Russia", 1930], + [2323, 35.7818, 14930772, "Turkey", 1930], + [8722, 60.85, 45957969, "United Kingdom", 1930], + [10139, 59.556, 125055606, "United States", 1930], + [10057, 66.336, 7052012, "Australia", 1940], + [8871, 63.99, 11655920, "Canada", 1940], + [841, 33.30311174, 509858820, "China", 1940], + [4631, 48.5472, 4672303, "Cuba", 1940], + [5439, 46.586, 3696232, "Finland", 1940], + [4821, 49.586, 40927546, "France", 1940], + [9711, 60.73821096, 71244059, "Germany", 1940], + [5373, 65.786, 133257, "Iceland", 1940], + [1081, 32.13056, 324372335, "India", 1940], + [3888, 49.052, 72709185, "Japan", 1940], + [10673, 65.35774359, 1629869, "New Zealand", 1940], + [8349, 65.818, 2971546, "Norway", 1940], + [3696, 44.752, 30041062, "Poland", 1940], + [5632, 41.056, 93588981, "Russia", 1940], + [3163, 34.5396, 17777172, "Turkey", 1940], + [10935, 60.89, 48235963, "United Kingdom", 1940], + [11320, 63.192, 134354133, "United States", 1940], + [12073, 69.134, 8177344, "Australia", 1950], + [12022, 68.25, 13736997, "Canada", 1950], + [535, 39.9994, 544112923, "China", 1950], + [8630, 59.8384, 5919997, "Cuba", 1950], + [7198, 64.144, 4008299, "Finland", 1950], + [7914, 66.594, 41879607, "France", 1950], + [7251, 67.0215058, 69786246, "Germany", 1950], + [8670, 71.004, 142656, "Iceland", 1950], + [908, 34.6284, 376325205, "India", 1950], + [2549, 59.378, 82199470, "Japan", 1950], + [14391, 69.392, 1908001, "New Zealand", 1950], + [11452, 71.492, 3265278, "Norway", 1950], + [4670, 59.123, 24824013, "Poland", 1950], + [7514, 57.084, 102798657, "Russia", 1950], + [3103, 42.5164, 21238496, "Turkey", 1950], + [11135, 68.58, 50616012, "United Kingdom", 1950], + [15319, 67.988, 157813040, "United States", 1950], + [12229, 68.8378, 8417640, "Australia", 1951], + [12419, 68.519, 14099994, "Canada", 1951], + [582, 40.936264, 558820362, "China", 1951], + [9245, 60.18618, 6051290, "Cuba", 1951], + [7738, 65.5708, 4049689, "Finland", 1951], + [8301, 66.3308, 42071027, "France", 1951], + [7884, 67.18742266, 70111671, "Germany", 1951], + [8350, 71.0438, 144928, "Iceland", 1951], + [908, 34.95868, 382231042, "India", 1951], + [2728, 61.0706, 83794452, "Japan", 1951], + [13032, 69.2654, 1947802, "New Zealand", 1951], + [11986, 72.4284, 3300422, "Norway", 1951], + [4801, 59.7336, 25264029, "Poland", 1951], + [7424, 57.5768, 104306354, "Russia", 1951], + [3701, 42.78358, 21806355, "Turkey", 1951], + [11416, 68.176, 50620538, "United Kingdom", 1951], + [16198, 68.0836, 159880756, "United States", 1951], + [12084, 69.2416, 8627052, "Australia", 1952], + [12911, 68.718, 14481497, "Canada", 1952], + [631, 41.873128, 570764965, "China", 1952], + [9446, 60.82796, 6180031, "Cuba", 1952], + [7914, 66.4476, 4095130, "Finland", 1952], + [8446, 67.6276, 42365756, "France", 1952], + [8561, 67.51033952, 70421462, "Germany", 1952], + [8120, 72.4836, 147681, "Iceland", 1952], + [912, 35.62796, 388515758, "India", 1952], + [3015, 63.1132, 85174909, "Japan", 1952], + [13281, 69.4988, 1992619, "New Zealand", 1952], + [12316, 72.5548, 3333895, "Norway", 1952], + [4832, 60.9112, 25738253, "Poland", 1952], + [7775, 57.9696, 105969442, "Russia", 1952], + [3963, 43.25976, 22393931, "Turkey", 1952], + [11367, 69.472, 50683596, "United Kingdom", 1952], + [16508, 68.2992, 162280405, "United States", 1952], + [12228, 69.8254, 8821938, "Australia", 1953], + [13158, 69.097, 14882050, "Canada", 1953], + [692, 42.809992, 580886559, "China", 1953], + [8192, 61.46974, 6304524, "Cuba", 1953], + [7877, 66.5044, 4142353, "Finland", 1953], + [8622, 67.5644, 42724452, "France", 1953], + [9252, 67.82125638, 70720721, "Germany", 1953], + [9169, 72.3034, 150779, "Iceland", 1953], + [947, 36.30024, 395137696, "India", 1953], + [3168, 63.4558, 86378004, "Japan", 1953], + [13388, 70.3522, 2040015, "New Zealand", 1953], + [12707, 73.0312, 3366281, "Norway", 1953], + [5027, 62.0038, 26236679, "Poland", 1953], + [7981, 58.7624, 107729541, "Russia", 1953], + [4361, 43.77694, 22999018, "Turkey", 1953], + [11751, 69.738, 50792671, "United Kingdom", 1953], + [16974, 68.6448, 164941716, "United States", 1953], + [12694, 69.9792, 9014508, "Australia", 1954], + [12687, 69.956, 15300472, "Canada", 1954], + [694, 44.663056, 589955812, "China", 1954], + [8492, 62.11152, 6424173, "Cuba", 1954], + [8470, 67.4612, 4189559, "Finland", 1954], + [9006, 68.4412, 43118110, "France", 1954], + [9926, 68.12117324, 71015688, "Germany", 1954], + [9821, 73.3532, 154110, "Iceland", 1954], + [962, 36.97552, 402065915, "India", 1954], + [3280, 64.6984, 87438747, "Japan", 1954], + [14907, 70.4656, 2088194, "New Zealand", 1954], + [13247, 73.1076, 3398028, "Norway", 1954], + [5224, 63.0134, 26750026, "Poland", 1954], + [8234, 60.7552, 109537868, "Russia", 1954], + [3892, 44.33512, 23619469, "Turkey", 1954], + [12173, 70.104, 50938227, "United Kingdom", 1954], + [16558, 69.4304, 167800046, "United States", 1954], + [13082, 70.303, 9212824, "Australia", 1955], + [13513, 70.015, 15733858, "Canada", 1955], + [706, 46.1666, 598574241, "China", 1955], + [8757, 62.7523, 6539470, "Cuba", 1955], + [8802, 67.258, 4235423, "Finland", 1955], + [9453, 68.708, 43528065, "France", 1955], + [10998, 68.4080901, 71313740, "Germany", 1955], + [10548, 73.293, 157584, "Iceland", 1955], + [963, 37.6538, 409280196, "India", 1955], + [3464, 65.861, 88389994, "Japan", 1955], + [14883, 70.599, 2136000, "New Zealand", 1955], + [13438, 73.314, 3429431, "Norway", 1955], + [5386, 63.939, 27269745, "Poland", 1955], + [8787, 63.148, 111355224, "Russia", 1955], + [4156, 44.9343, 24253200, "Turkey", 1955], + [12531, 70.07, 51113711, "United Kingdom", 1955], + [17409, 69.476, 170796378, "United States", 1955], + [13217, 70.1868, 9420602, "Australia", 1956], + [14253, 70.004, 16177451, "Canada", 1956], + [736, 48.536704, 607167524, "China", 1956], + [9424, 63.39308, 6652086, "Cuba", 1956], + [8971, 67.8748, 4279108, "Finland", 1956], + [9907, 68.7448, 43946534, "France", 1956], + [11751, 68.70345102, 71623569, "Germany", 1956], + [10575, 72.9728, 161136, "Iceland", 1956], + [993, 38.33608, 416771502, "India", 1956], + [3646, 65.7236, 89262489, "Japan", 1956], + [15358, 70.8624, 2182943, "New Zealand", 1956], + [14054, 73.3604, 3460640, "Norway", 1956], + [5530, 64.7816, 27787997, "Poland", 1956], + [9465, 64.6408, 113152347, "Russia", 1956], + [4122, 45.57448, 24898170, "Turkey", 1956], + [12572, 70.336, 51315724, "United Kingdom", 1956], + [17428, 69.5516, 173877321, "United States", 1956], + [13191, 70.4706, 9637408, "Australia", 1957], + [14177, 69.923, 16624767, "Canada", 1957], + [780, 48.587368, 615992182, "China", 1957], + [10636, 64.03586, 6764787, "Cuba", 1957], + [9302, 67.3716, 4320250, "Finland", 1957], + [10442, 69.1816, 44376073, "France", 1957], + [12385, 68.62532856, 71955005, "Germany", 1957], + [10295, 73.4626, 164721, "Iceland", 1957], + [959, 39.02236, 424541513, "India", 1957], + [3843, 65.5962, 90084818, "Japan", 1957], + [15441, 70.3858, 2229176, "New Zealand", 1957], + [14379, 73.3068, 3491657, "Norway", 1957], + [5730, 65.5442, 28297669, "Poland", 1957], + [9496, 63.7336, 114909562, "Russia", 1957], + [4943, 46.25466, 25552398, "Turkey", 1957], + [12702, 70.452, 51543847, "United Kingdom", 1957], + [17430, 69.3272, 176995108, "United States", 1957], + [13545, 71.0244, 9859257, "Australia", 1958], + [14056, 70.582, 17067983, "Canada", 1958], + [889, 48.143792, 625155626, "China", 1958], + [10501, 64.67964, 6881209, "Cuba", 1958], + [9276, 68.5084, 4358901, "Finland", 1958], + [10681, 70.4184, 44827950, "France", 1958], + [12884, 69.36929231, 72318498, "Germany", 1958], + [10896, 73.4224, 168318, "Iceland", 1958], + [1005, 39.71364, 432601236, "India", 1958], + [3996, 67.2188, 90883290, "Japan", 1958], + [15688, 71.0192, 2275392, "New Zealand", 1958], + [14285, 73.2932, 3522361, "Norway", 1958], + [5923, 66.0188, 28792427, "Poland", 1958], + [10037, 66.6264, 116615781, "Russia", 1958], + [5252, 46.97084, 26214022, "Turkey", 1958], + [12672, 70.628, 51800117, "United Kingdom", 1958], + [16961, 69.5928, 180107612, "United States", 1958], + [14076, 70.5982, 10079604, "Australia", 1959], + [14289, 70.621, 17498573, "Canada", 1959], + [958, 36.336856, 634649557, "China", 1959], + [9234, 65.32842, 7005486, "Cuba", 1959], + [9751, 68.6852, 4395427, "Finland", 1959], + [10911, 70.4552, 45319442, "France", 1959], + [13759, 69.48021979, 72724260, "Germany", 1959], + [10865, 72.6522, 171919, "Iceland", 1959], + [1002, 40.41292, 440968677, "India", 1959], + [4288, 67.6114, 91681713, "Japan", 1959], + [16454, 70.9326, 2322669, "New Zealand", 1959], + [14797, 73.4196, 3552545, "Norway", 1959], + [6009, 65.6314, 29266789, "Poland", 1959], + [9755, 67.3692, 118266807, "Russia", 1959], + [4869, 47.72102, 26881379, "Turkey", 1959], + [13122, 70.724, 52088147, "United Kingdom", 1959], + [17909, 69.8084, 183178348, "United States", 1959], + [14346, 71.042, 10292328, "Australia", 1960], + [14414, 71, 17909232, "Canada", 1960], + [889, 29.51112, 644450173, "China", 1960], + [9213, 65.9852, 7141129, "Cuba", 1960], + [10560, 68.882, 4430228, "Finland", 1960], + [11642, 70.672, 45865699, "France", 1960], + [14808, 69.40190727, 73179665, "Germany", 1960], + [10993, 74.082, 175520, "Iceland", 1960], + [1048, 41.1222, 449661874, "India", 1960], + [4756, 67.904, 92500754, "Japan", 1960], + [16179, 71.396, 2371999, "New Zealand", 1960], + [15542, 73.436, 3582016, "Norway", 1960], + [6248, 67.964, 29716363, "Poland", 1960], + [10496, 68.382, 119860289, "Russia", 1960], + [4735, 48.4992, 27553280, "Turkey", 1960], + [13697, 70.94, 52410496, "United Kingdom", 1960], + [18059, 69.734, 186176524, "United States", 1960], + [14126, 71.3158, 10494911, "Australia", 1961], + [14545, 71.229, 18295922, "Canada", 1961], + [558, 31.930824, 654625069, "China", 1961], + [9248, 66.64998, 7289828, "Cuba", 1961], + [11286, 68.9088, 4463432, "Finland", 1961], + [12168, 71.2588, 46471083, "France", 1961], + [15317, 69.99702797, 73686490, "Germany", 1961], + [10801, 73.4618, 179106, "Iceland", 1961], + [1051, 41.84348, 458691457, "India", 1961], + [5276, 68.5566, 93357259, "Japan", 1961], + [16664, 71.1194, 2423769, "New Zealand", 1961], + [16425, 73.4424, 3610710, "Norway", 1961], + [6669, 68.0866, 30138099, "Poland", 1961], + [10908, 68.6248, 121390327, "Russia", 1961], + [4691, 49.30038, 28229291, "Turkey", 1961], + [13887, 70.686, 52765864, "United Kingdom", 1961], + [18170, 70.1396, 189077076, "United States", 1961], + [14742, 71.0896, 10691220, "Australia", 1962], + [15276, 71.258, 18659663, "Canada", 1962], + [567, 42.274688, 665426760, "China", 1962], + [9273, 67.32476, 7450404, "Cuba", 1962], + [11560, 68.6156, 4494623, "Finland", 1962], + [12767, 70.7956, 47121575, "France", 1962], + [15872, 70.16889372, 74238494, "Germany", 1962], + [11489, 73.6716, 182640, "Iceland", 1962], + [1046, 42.57776, 468054145, "India", 1962], + [5686, 68.8392, 94263646, "Japan", 1962], + [16646, 71.3828, 2477328, "New Zealand", 1962], + [16793, 73.3188, 3638791, "Norway", 1962], + [6511, 67.7492, 30530513, "Poland", 1962], + [11027, 68.2776, 122842753, "Russia", 1962], + [4849, 50.11556, 28909985, "Turkey", 1962], + [13897, 70.752, 53146634, "United Kingdom", 1962], + [18966, 70.0252, 191860710, "United States", 1962], + [15357, 71.1534, 10892700, "Australia", 1963], + [15752, 71.267, 19007305, "Canada", 1963], + [635, 49.619432, 677332765, "China", 1963], + [9244, 68.00654, 7618359, "Cuba", 1963], + [11858, 69.0224, 4522727, "Finland", 1963], + [13235, 70.6524, 47781535, "France", 1963], + [16221, 70.26131586, 74820389, "Germany", 1963], + [12447, 72.9714, 186056, "Iceland", 1963], + [1071, 43.32404, 477729958, "India", 1963], + [6106, 69.9218, 95227653, "Japan", 1963], + [17340, 71.4562, 2530791, "New Zealand", 1963], + [17347, 72.9552, 3666690, "Norway", 1963], + [6836, 68.6818, 30893775, "Poland", 1963], + [10620, 68.7404, 124193114, "Russia", 1963], + [5188, 50.93674, 29597047, "Turkey", 1963], + [14393, 70.658, 53537821, "United Kingdom", 1963], + [19497, 69.8508, 194513911, "United States", 1963], + [16098, 70.8172, 11114995, "Australia", 1964], + [16464, 71.646, 19349346, "Canada", 1964], + [713, 50.988016, 690932043, "China", 1964], + [9179, 68.69332, 7787149, "Cuba", 1964], + [12389, 69.2292, 4546343, "Finland", 1964], + [13969, 71.6192, 48402900, "France", 1964], + [17100, 70.82344196, 75410766, "Germany", 1964], + [13450, 73.5612, 189276, "Iceland", 1964], + [1125, 44.07932, 487690114, "India", 1964], + [6741, 70.3944, 96253064, "Japan", 1964], + [17837, 71.4996, 2581578, "New Zealand", 1964], + [18118, 73.4516, 3694987, "Norway", 1964], + [7078, 68.9144, 31229448, "Poland", 1964], + [11836, 69.5332, 125412397, "Russia", 1964], + [5296, 51.75292, 30292969, "Turkey", 1964], + [15067, 71.444, 53920055, "United Kingdom", 1964], + [20338, 70.1364, 197028908, "United States", 1964], + [16601, 71.151, 11368011, "Australia", 1965], + [17243, 71.745, 19693538, "Canada", 1965], + [772, 53.26108, 706590947, "China", 1965], + [9116, 69.3761, 7951928, "Cuba", 1965], + [13006, 68.986, 4564690, "Finland", 1965], + [14514, 71.456, 48952283, "France", 1965], + [17838, 70.81075623, 75990737, "Germany", 1965], + [14173, 73.831, 192251, "Iceland", 1965], + [1053, 44.8386, 497920270, "India", 1965], + [7048, 70.447, 97341852, "Japan", 1965], + [18632, 71.433, 2628003, "New Zealand", 1965], + [18980, 73.568, 3724065, "Norway", 1965], + [7409, 69.617, 31539695, "Poland", 1965], + [12363, 69.116, 126483874, "Russia", 1965], + [5309, 52.5551, 31000167, "Turkey", 1965], + [15292, 71.43, 54278349, "United Kingdom", 1965], + [21361, 70.212, 199403532, "United States", 1965], + [16756, 70.9948, 11657281, "Australia", 1966], + [18022, 71.874, 20041006, "Canada", 1966], + [826, 54.364464, 724490033, "China", 1966], + [9436, 70.04688, 8110428, "Cuba", 1966], + [13269, 69.5028, 4577033, "Finland", 1966], + [15158, 71.8728, 49411342, "France", 1966], + [18262, 70.92828395, 76558016, "Germany", 1966], + [15166, 73.2208, 194935, "Iceland", 1966], + [1037, 45.59388, 508402908, "India", 1966], + [7724, 71.2596, 98494630, "Japan", 1966], + [19467, 71.2964, 2668590, "New Zealand", 1966], + [19588, 73.8444, 3754010, "Norway", 1966], + [7818, 70.0296, 31824145, "Poland", 1966], + [12823, 69.1788, 127396324, "Russia", 1966], + [5906, 53.33228, 31718266, "Turkey", 1966], + [15494, 71.346, 54606608, "United Kingdom", 1966], + [22495, 70.2276, 201629471, "United States", 1966], + [17570, 71.2786, 11975795, "Australia", 1967], + [18240, 72.083, 20389445, "Canada", 1967], + [719, 55.889368, 744365635, "China", 1967], + [10372, 70.69866, 8263547, "Cuba", 1967], + [13477, 69.6796, 4584264, "Finland", 1967], + [15759, 71.8696, 49791771, "France", 1967], + [18311, 71.15404398, 77106876, "Germany", 1967], + [14734, 73.7206, 197356, "Iceland", 1967], + [1096, 46.33916, 519162069, "India", 1967], + [8454, 71.5522, 99711082, "Japan", 1967], + [18309, 71.6798, 2704205, "New Zealand", 1967], + [20686, 73.9108, 3784579, "Norway", 1967], + [8044, 69.7322, 32085011, "Poland", 1967], + [13256, 68.9616, 128165823, "Russia", 1967], + [6020, 54.08346, 32448404, "Turkey", 1967], + [15777, 71.972, 54904680, "United Kingdom", 1967], + [22803, 70.5532, 203713082, "United States", 1967], + [18261, 70.9124, 12305530, "Australia", 1968], + [18900, 72.242, 20739031, "Canada", 1968], + [669, 56.860432, 765570668, "China", 1968], + [9626, 71.32644, 8413329, "Cuba", 1968], + [13726, 69.6364, 4589226, "Finland", 1968], + [16321, 71.8664, 50126895, "France", 1968], + [19254, 70.80345367, 77611000, "Germany", 1968], + [13752, 73.9304, 199634, "Iceland", 1968], + [1095, 47.07144, 530274729, "India", 1968], + [9439, 71.8748, 100988866, "Japan", 1968], + [18082, 71.3432, 2738283, "New Zealand", 1968], + [21022, 73.7872, 3815399, "Norway", 1968], + [8473, 70.3748, 32330582, "Poland", 1968], + [13902, 68.9144, 128837792, "Russia", 1968], + [6295, 54.80964, 33196289, "Turkey", 1968], + [16357, 71.598, 55171084, "United Kingdom", 1968], + [23647, 70.2088, 205687611, "United States", 1968], + [18949, 71.3262, 12621240, "Australia", 1969], + [19614, 72.401, 21089228, "Canada", 1969], + [732, 58.367416, 787191243, "China", 1969], + [9377, 71.92622, 8563191, "Cuba", 1969], + [15058, 69.5132, 4595807, "Finland", 1969], + [17339, 71.6032, 50466183, "France", 1969], + [20409, 70.65682236, 78038271, "Germany", 1969], + [13983, 73.7002, 201941, "Iceland", 1969], + [1141, 47.78972, 541844848, "India", 1969], + [10548, 72.1074, 102323674, "Japan", 1969], + [19745, 71.7166, 2775684, "New Zealand", 1969], + [21845, 73.4936, 3845932, "Norway", 1969], + [8331, 69.8674, 32571673, "Poland", 1969], + [13972, 68.3872, 129475269, "Russia", 1969], + [6470, 55.51382, 33969201, "Turkey", 1969], + [16616, 71.554, 55406435, "United Kingdom", 1969], + [24147, 70.4444, 207599308, "United States", 1969], + [19719, 71, 12904760, "Australia", 1970], + [19842, 72.6, 21439200, "Canada", 1970], + [848, 60, 808510713, "China", 1970], + [8918, 72.5, 8715123, "Cuba", 1970], + [16245, 70.2, 4606740, "Finland", 1970], + [18185, 72.5, 50843830, "France", 1970], + [21218, 70.9, 78366605, "Germany", 1970], + [14937, 73.8, 204392, "Iceland", 1970], + [1170, 48.5, 553943226, "India", 1970], + [14203, 72.2, 103707537, "Japan", 1970], + [19200, 71.5, 2819548, "New Zealand", 1970], + [22186, 73.9, 3875719, "Norway", 1970], + [8705, 70, 32816751, "Poland", 1970], + [14915, 68.5, 130126383, "Russia", 1970], + [6740, 56.2, 34772031, "Turkey", 1970], + [16933, 71.8, 55611401, "United Kingdom", 1970], + [23908, 70.7, 209485807, "United States", 1970], + [20176, 71.3, 13150591, "Australia", 1971], + [20688, 72.9, 21790338, "Canada", 1971], + [876, 60.6, 829367784, "China", 1971], + [9471, 73.2, 8869961, "Cuba", 1971], + [16564, 70.5, 4623389, "Finland", 1971], + [18891, 72.6, 51273975, "France", 1971], + [21695, 71, 78584779, "Germany", 1971], + [16687, 73.8, 207050, "Iceland", 1971], + [1154, 48.9, 566605402, "India", 1971], + [14673, 72.8, 105142875, "Japan", 1971], + [19871, 71.6, 2871810, "New Zealand", 1971], + [23239, 74.1, 3904750, "Norway", 1971], + [9256, 70.2, 33068997, "Poland", 1971], + [15170, 68.6, 130808492, "Russia", 1971], + [6765, 56.9, 35608079, "Turkey", 1971], + [17207, 72, 55785325, "United Kingdom", 1971], + [24350, 71, 211357912, "United States", 1971], + [20385, 71.7, 13364238, "Australia", 1972], + [21532, 72.9, 22141998, "Canada", 1972], + [843, 61.1, 849787991, "China", 1972], + [9745, 73.9, 9025299, "Cuba", 1972], + [17722, 70.9, 4644847, "Finland", 1972], + [19570, 72.8, 51741044, "France", 1972], + [22497, 71.2, 78700104, "Germany", 1972], + [17413, 73.9, 209868, "Iceland", 1972], + [1125, 49.3, 579800632, "India", 1972], + [15694, 73.2, 106616535, "Japan", 1972], + [20349, 71.8, 2930469, "New Zealand", 1972], + [24308, 74.3, 3932945, "Norway", 1972], + [9854, 70.6, 33328713, "Poland", 1972], + [15113, 68.7, 131517584, "Russia", 1972], + [7186, 57.7, 36475356, "Turkey", 1972], + [17793, 72, 55927492, "United Kingdom", 1972], + [25374, 71.3, 213219515, "United States", 1972], + [21185, 72, 13552190, "Australia", 1973], + [22797, 73.1, 22488744, "Canada", 1973], + [894, 61.7, 869474823, "China", 1973], + [10439, 74.1, 9176051, "Cuba", 1973], + [18804, 71.3, 4668813, "Finland", 1973], + [20486, 73.1, 52214014, "France", 1973], + [23461, 71.5, 78732884, "Germany", 1973], + [18360, 74.1, 212731, "Iceland", 1973], + [1151, 49.9, 593451889, "India", 1973], + [16731, 73.5, 108085729, "Japan", 1973], + [21342, 71.8, 2989985, "New Zealand", 1973], + [25278, 74.5, 3959705, "Norway", 1973], + [10504, 70.9, 33597810, "Poland", 1973], + [16236, 68.7, 132254362, "Russia", 1973], + [7442, 58.3, 37366922, "Turkey", 1973], + [19043, 72, 56039166, "United Kingdom", 1973], + [26567, 71.6, 215092900, "United States", 1973], + [21383, 72.1, 13725400, "Australia", 1974], + [23405, 73.2, 22823272, "Canada", 1974], + [888, 62.1, 888132761, "China", 1974], + [10805, 74.3, 9315371, "Cuba", 1974], + [19273, 71.4, 4691818, "Finland", 1974], + [20997, 73.3, 52647616, "France", 1974], + [23662, 71.8, 78713928, "Germany", 1974], + [19123, 74.3, 215465, "Iceland", 1974], + [1139, 50.4, 607446519, "India", 1974], + [16320, 73.9, 109495053, "Japan", 1974], + [22131, 72, 3042573, "New Zealand", 1974], + [26252, 74.7, 3984291, "Norway", 1974], + [11020, 71.2, 33877397, "Poland", 1974], + [16594, 68.6, 133012558, "Russia", 1974], + [7991, 58.9, 38272701, "Turkey", 1974], + [18801, 72.3, 56122405, "United Kingdom", 1974], + [26258, 72.1, 217001865, "United States", 1974], + [21708, 72.5, 13892674, "Australia", 1975], + [23593, 73.6, 23140609, "Canada", 1975], + [920, 62.6, 905580445, "China", 1975], + [11176, 74.6, 9438445, "Cuba", 1975], + [19409, 71.6, 4711459, "Finland", 1975], + [20851, 73.2, 53010727, "France", 1975], + [23630, 71.9, 78667327, "Germany", 1975], + [19023, 74.7, 217958, "Iceland", 1975], + [1212, 50.9, 621703641, "India", 1975], + [16632, 74.4, 110804519, "Japan", 1975], + [21467, 72.1, 3082883, "New Zealand", 1975], + [27553, 74.8, 4006221, "Norway", 1975], + [11430, 70.9, 34168112, "Poland", 1975], + [16530, 68.2, 133788113, "Russia", 1975], + [8381, 59.5, 39185637, "Turkey", 1975], + [18699, 72.6, 56179925, "United Kingdom", 1975], + [25934, 72.6, 218963561, "United States", 1975], + [22372, 73, 14054956, "Australia", 1976], + [24563, 73.9, 23439940, "Canada", 1976], + [891, 62.4, 921688199, "China", 1976], + [11334, 74.6, 9544268, "Cuba", 1976], + [19268, 72, 4726803, "Finland", 1976], + [21661, 73.4, 53293030, "France", 1976], + [24904, 72.3, 78604473, "Germany", 1976], + [19978, 75.2, 220162, "Iceland", 1976], + [1201, 51.4, 636182810, "India", 1976], + [17117, 74.9, 111992858, "Japan", 1976], + [21749, 72.3, 3108745, "New Zealand", 1976], + [29117, 75, 4025297, "Norway", 1976], + [11605, 70.8, 34468877, "Poland", 1976], + [17192, 68, 134583945, "Russia", 1976], + [9142, 60, 40100696, "Turkey", 1976], + [19207, 72.9, 56212943, "United Kingdom", 1976], + [27041, 72.9, 220993166, "United States", 1976], + [22373, 73.4, 14211657, "Australia", 1977], + [25095, 74.2, 23723801, "Canada", 1977], + [904, 63.3, 936554514, "China", 1977], + [11712, 74.4, 9634677, "Cuba", 1977], + [19261, 72.4, 4738949, "Finland", 1977], + [22270, 73.8, 53509578, "France", 1977], + [25678, 72.6, 78524727, "Germany", 1977], + [21583, 75.6, 222142, "Iceland", 1977], + [1266, 52, 650907559, "India", 1977], + [17705, 75.3, 113067848, "Japan", 1977], + [20623, 72.4, 3122551, "New Zealand", 1977], + [30319, 75.2, 4041789, "Norway", 1977], + [11713, 70.6, 34779313, "Poland", 1977], + [17487, 67.8, 135406786, "Russia", 1977], + [8863, 60.9, 41020211, "Turkey", 1977], + [19684, 73.1, 56224944, "United Kingdom", 1977], + [27990, 73.2, 223090871, "United States", 1977], + [22763, 73.8, 14368543, "Australia", 1978], + [25853, 74.4, 23994948, "Canada", 1978], + [1016, 63.7, 950537317, "China", 1978], + [12312, 74.5, 9711393, "Cuba", 1978], + [19608, 72.9, 4749940, "Finland", 1978], + [22928, 74.1, 53685486, "France", 1978], + [26444, 72.7, 78426715, "Germany", 1978], + [22659, 76, 224019, "Iceland", 1978], + [1305, 52.6, 665936435, "India", 1978], + [18484, 75.7, 114054587, "Japan", 1978], + [20707, 72.7, 3129098, "New Zealand", 1978], + [31348, 75.3, 4056280, "Norway", 1978], + [12033, 70.7, 35100942, "Poland", 1978], + [17818, 67.7, 136259517, "Russia", 1978], + [8400, 61.4, 41953105, "Turkey", 1978], + [20337, 73, 56223974, "United Kingdom", 1978], + [29281, 73.5, 225239456, "United States", 1978], + [23697, 74.2, 14532401, "Australia", 1979], + [26665, 74.7, 24257594, "Canada", 1979], + [1059, 64, 964155176, "China", 1979], + [12519, 74.6, 9777287, "Cuba", 1979], + [20918, 73.3, 4762758, "Finland", 1979], + [23647, 74.3, 53857610, "France", 1979], + [27515, 72.9, 78305017, "Germany", 1979], + [23523, 76.4, 225972, "Iceland", 1979], + [1211, 53.1, 681358553, "India", 1979], + [19346, 76.1, 114993274, "Japan", 1979], + [21144, 73, 3135453, "New Zealand", 1979], + [32737, 75.5, 4069626, "Norway", 1979], + [11703, 70.7, 35435627, "Poland", 1979], + [17632, 67.4, 137144808, "Russia", 1979], + [8160, 62, 42912350, "Turkey", 1979], + [20871, 73.1, 56220089, "United Kingdom", 1979], + [29951, 73.7, 227411604, "United States", 1979], + [23872, 74.5, 14708323, "Australia", 1980], + [26678, 75, 24515788, "Canada", 1980], + [1073, 64.5, 977837433, "China", 1980], + [12284, 74.6, 9835177, "Cuba", 1980], + [21965, 73.7, 4779454, "Finland", 1980], + [23962, 74.5, 54053224, "France", 1980], + [27765, 73.1, 78159527, "Germany", 1980], + [24580, 76.7, 228127, "Iceland", 1980], + [1270, 53.6, 697229745, "India", 1980], + [19741, 76.3, 115912104, "Japan", 1980], + [21259, 73.2, 3146771, "New Zealand", 1980], + [34346, 75.7, 4082525, "Norway", 1980], + [11307, 70.6, 35782855, "Poland", 1980], + [17557, 67.3, 138063062, "Russia", 1980], + [7828, 62.7, 43905790, "Turkey", 1980], + [20417, 73.4, 56221513, "United Kingdom", 1980], + [29619, 73.8, 229588208, "United States", 1980], + [24308, 74.8, 14898019, "Australia", 1981], + [27171, 75.4, 24768525, "Canada", 1981], + [1099, 64.8, 991553829, "China", 1981], + [13224, 74.6, 9884219, "Cuba", 1981], + [22279, 74, 4800899, "Finland", 1981], + [24186, 74.8, 54279038, "France", 1981], + [27846, 73.4, 77990369, "Germany", 1981], + [25312, 76.9, 230525, "Iceland", 1981], + [1322, 54.2, 713561406, "India", 1981], + [20413, 76.7, 116821569, "Japan", 1981], + [22191, 73.5, 3164965, "New Zealand", 1981], + [34659, 75.8, 4095177, "Norway", 1981], + [10610, 71, 36145211, "Poland", 1981], + [17619, 67.5, 139006739, "Russia", 1981], + [8518, 63.2, 44936836, "Turkey", 1981], + [20149, 73.8, 56231020, "United Kingdom", 1981], + [30070, 74, 231765783, "United States", 1981], + [23884, 75, 15101227, "Australia", 1982], + [26031, 75.8, 25017501, "Canada", 1982], + [1175, 65.2, 1005328574, "China", 1982], + [13421, 74.7, 9925618, "Cuba", 1982], + [22873, 74.3, 4826135, "Finland", 1982], + [24753, 75, 54528408, "France", 1982], + [27645, 73.6, 77812348, "Germany", 1982], + [25455, 77.1, 233121, "Iceland", 1982], + [1334, 54.6, 730303461, "India", 1982], + [20951, 77, 117708919, "Japan", 1982], + [22436, 73.7, 3188664, "New Zealand", 1982], + [34704, 75.9, 4107655, "Norway", 1982], + [10420, 71.2, 36517072, "Poland", 1982], + [17951, 67.9, 139969243, "Russia", 1982], + [8323, 63.7, 45997940, "Turkey", 1982], + [20607, 74.1, 56250124, "United Kingdom", 1982], + [29230, 74.4, 233953874, "United States", 1982], + [23584, 75.3, 15318254, "Australia", 1983], + [26525, 76.1, 25272656, "Canada", 1983], + [1229, 65.6, 1019698475, "China", 1983], + [13669, 74.6, 9966733, "Cuba", 1983], + [23351, 74.5, 4853196, "Finland", 1983], + [25188, 75.2, 54799049, "France", 1983], + [28227, 74, 77657451, "Germany", 1983], + [24594, 77.3, 235860, "Iceland", 1983], + [1412, 55.1, 747374856, "India", 1983], + [21446, 77.1, 118552097, "Japan", 1983], + [22808, 73.9, 3215826, "New Zealand", 1983], + [35932, 76, 4120386, "Norway", 1983], + [10835, 71.1, 36879742, "Poland", 1983], + [18417, 67.7, 140951400, "Russia", 1983], + [8535, 64.2, 47072603, "Turkey", 1983], + [21357, 74.3, 56283959, "United Kingdom", 1983], + [30185, 74.6, 236161961, "United States", 1983], + [24934, 75.5, 15548591, "Australia", 1984], + [27781, 76.4, 25546736, "Canada", 1984], + [1456, 66, 1035328572, "China", 1984], + [14019, 74.4, 10017061, "Cuba", 1984], + [23926, 74.6, 4879222, "Finland", 1984], + [25497, 75.5, 55084677, "France", 1984], + [29135, 74.4, 77566776, "Germany", 1984], + [25356, 77.4, 238647, "Iceland", 1984], + [1436, 55.5, 764664278, "India", 1984], + [22268, 77.4, 119318921, "Japan", 1984], + [23698, 74.1, 3243078, "New Zealand", 1984], + [38057, 76.1, 4133833, "Norway", 1984], + [11138, 70.8, 37208529, "Poland", 1984], + [18527, 67.4, 141955200, "Russia", 1984], + [8798, 64.8, 48138191, "Turkey", 1984], + [21904, 74.6, 56337848, "United Kingdom", 1984], + [32110, 74.8, 238404223, "United States", 1984], + [25875, 75.7, 15791043, "Australia", 1985], + [29016, 76.5, 25848173, "Canada", 1985], + [1557, 66.4, 1052622410, "China", 1985], + [14135, 74.3, 10082990, "Cuba", 1985], + [24630, 74.7, 4902219, "Finland", 1985], + [25917, 75.7, 55379923, "France", 1985], + [29851, 74.6, 77570009, "Germany", 1985], + [25997, 77.6, 241411, "Iceland", 1985], + [1462, 55.9, 782085127, "India", 1985], + [23554, 77.8, 119988663, "Japan", 1985], + [23750, 74.2, 3268192, "New Zealand", 1985], + [40031, 76.1, 4148355, "Norway", 1985], + [11159, 70.7, 37486105, "Poland", 1985], + [18576, 68.2, 142975753, "Russia", 1985], + [9163, 65.2, 49178079, "Turkey", 1985], + [22648, 74.7, 56415196, "United Kingdom", 1985], + [33065, 74.8, 240691557, "United States", 1985], + [26057, 76, 16047026, "Australia", 1986], + [29482, 76.6, 26181342, "Canada", 1986], + [1604, 66.8, 1071834975, "China", 1986], + [14025, 74.5, 10167998, "Cuba", 1986], + [25133, 74.7, 4921293, "Finland", 1986], + [26453, 76, 55686610, "France", 1986], + [30514, 74.8, 77671877, "Germany", 1986], + [27379, 77.6, 244145, "Iceland", 1986], + [1493, 56.3, 799607235, "India", 1986], + [24116, 78.1, 120551455, "Japan", 1986], + [24180, 74.2, 3290132, "New Zealand", 1986], + [41450, 76.1, 4164166, "Norway", 1986], + [11429, 70.9, 37703942, "Poland", 1986], + [19221, 69.8, 144016095, "Russia", 1986], + [9556, 65.7, 50187091, "Turkey", 1986], + [23516, 74.9, 56519444, "United Kingdom", 1986], + [33899, 74.9, 243032017, "United States", 1986], + [26969, 76.2, 16314778, "Australia", 1987], + [30288, 76.8, 26541981, "Canada", 1987], + [1652, 67.2, 1092646739, "China", 1987], + [13805, 74.6, 10269276, "Cuba", 1987], + [26086, 74.7, 4937259, "Finland", 1987], + [26963, 76.4, 56005443, "France", 1987], + [30986, 75.1, 77864381, "Germany", 1987], + [29335, 77.7, 246867, "Iceland", 1987], + [1525, 56.6, 817232241, "India", 1987], + [25018, 78.4, 121021830, "Japan", 1987], + [24222, 74.4, 3310408, "New Zealand", 1987], + [42225, 76.1, 4181326, "Norway", 1987], + [11207, 71.1, 37867481, "Poland", 1987], + [19355, 70.1, 145056221, "Russia", 1987], + [10351, 66.1, 51168841, "Turkey", 1987], + [24551, 75.1, 56649375, "United Kingdom", 1987], + [34787, 75, 245425409, "United States", 1987], + [27757, 76.4, 16585905, "Australia", 1988], + [31356, 77.1, 26919036, "Canada", 1988], + [1597, 67.5, 1114162025, "China", 1988], + [13925, 74.6, 10379080, "Cuba", 1988], + [27282, 74.8, 4951886, "Finland", 1988], + [28101, 76.6, 56328053, "France", 1988], + [31906, 75.3, 78146938, "Germany", 1988], + [28780, 77.8, 249563, "Iceland", 1988], + [1649, 57, 834944397, "India", 1988], + [26724, 78.6, 121432942, "Japan", 1988], + [24060, 74.6, 3332297, "New Zealand", 1988], + [42101, 76.3, 4199817, "Norway", 1988], + [11418, 71.2, 37990683, "Poland", 1988], + [19660, 70, 146040116, "Russia", 1988], + [10421, 66.5, 52126497, "Turkey", 1988], + [25750, 75.3, 56797704, "United Kingdom", 1988], + [35929, 75, 247865202, "United States", 1988], + [28556, 76.6, 16849253, "Australia", 1989], + [31550, 77.2, 27296517, "Canada", 1989], + [1474, 67.7, 1135128009, "China", 1989], + [13829, 74.7, 10486110, "Cuba", 1989], + [28735, 74.8, 4967776, "Finland", 1989], + [28942, 76.9, 56643349, "France", 1989], + [32706, 75.4, 78514790, "Germany", 1989], + [28629, 78, 252219, "Iceland", 1989], + [1723, 57.3, 852736160, "India", 1989], + [28077, 78.9, 121831143, "Japan", 1989], + [24206, 75, 3360350, "New Zealand", 1989], + [42449, 76.5, 4219532, "Norway", 1989], + [11212, 71.1, 38094812, "Poland", 1989], + [19906, 69.8, 146895053, "Russia", 1989], + [10103, 66.9, 53066569, "Turkey", 1989], + [26279, 75.5, 56953861, "United Kingdom", 1989], + [36830, 75.2, 250340795, "United States", 1989], + [28604, 77, 17096869, "Australia", 1990], + [31163, 77.4, 27662440, "Canada", 1990], + [1516, 68, 1154605773, "China", 1990], + [13670, 74.7, 10582082, "Cuba", 1990], + [28599, 75, 4986705, "Finland", 1990], + [29476, 77.1, 56943299, "France", 1990], + [31476, 75.4, 78958237, "Germany", 1990], + [28666, 78.1, 254830, "Iceland", 1990], + [1777, 57.7, 870601776, "India", 1990], + [29550, 79.1, 122249285, "Japan", 1990], + [24021, 75.4, 3397534, "New Zealand", 1990], + [43296, 76.8, 4240375, "Norway", 1990], + [10088, 70.8, 38195258, "Poland", 1990], + [19349, 69.6, 147568552, "Russia", 1990], + [10670, 67.3, 53994605, "Turkey", 1990], + [26424, 75.7, 57110117, "United Kingdom", 1990], + [37062, 75.4, 252847810, "United States", 1990], + [28122, 77.4, 17325818, "Australia", 1991], + [30090, 77.6, 28014102, "Canada", 1991], + [1634, 68.3, 1172327831, "China", 1991], + [12113, 74.7, 10664577, "Cuba", 1991], + [26761, 75.4, 5009381, "Finland", 1991], + [29707, 77.3, 57226524, "France", 1991], + [32844, 75.6, 79483739, "Germany", 1991], + [28272, 78.3, 257387, "Iceland", 1991], + [1760, 58, 888513869, "India", 1991], + [30437, 79.2, 122702527, "Japan", 1991], + [22636, 75.8, 3445596, "New Zealand", 1991], + [44419, 77.1, 4262367, "Norway", 1991], + [9347, 70.7, 38297549, "Poland", 1991], + [18332, 69.4, 148040354, "Russia", 1991], + [10568, 67.6, 54909508, "Turkey", 1991], + [26017, 76, 57264600, "United Kingdom", 1991], + [36543, 75.6, 255367160, "United States", 1991], + [27895, 77.7, 17538387, "Australia", 1992], + [29977, 77.7, 28353843, "Canada", 1992], + [1845, 68.6, 1188450231, "China", 1992], + [10637, 74.8, 10735775, "Cuba", 1992], + [25726, 75.8, 5034898, "Finland", 1992], + [30033, 77.5, 57495252, "France", 1992], + [33221, 75.9, 80075940, "Germany", 1992], + [26977, 78.5, 259895, "Iceland", 1992], + [1821, 58.3, 906461358, "India", 1992], + [30610, 79.4, 123180357, "Japan", 1992], + [22651, 76.1, 3502765, "New Zealand", 1992], + [45742, 77.3, 4285504, "Norway", 1992], + [9553, 71.1, 38396826, "Poland", 1992], + [15661, 68, 148322473, "Russia", 1992], + [10920, 67.9, 55811134, "Turkey", 1992], + [26062, 76.3, 57419469, "United Kingdom", 1992], + [37321, 75.8, 257908206, "United States", 1992], + [28732, 78, 17738428, "Australia", 1993], + [30424, 77.8, 28680921, "Canada", 1993], + [2078, 68.9, 1202982955, "China", 1993], + [9001, 74.8, 10797556, "Cuba", 1993], + [25414, 76.2, 5061465, "Finland", 1993], + [29719, 77.7, 57749881, "France", 1993], + [32689, 76.2, 80675999, "Germany", 1993], + [27055, 78.7, 262383, "Iceland", 1993], + [1871, 58.6, 924475633, "India", 1993], + [30587, 79.6, 123658854, "Japan", 1993], + [23830, 76.5, 3564227, "New Zealand", 1993], + [46765, 77.6, 4309606, "Norway", 1993], + [9884, 71.7, 38485892, "Poland", 1993], + [14320, 65.2, 148435811, "Russia", 1993], + [11569, 68.3, 56707454, "Turkey", 1993], + [26688, 76.5, 57575969, "United Kingdom", 1993], + [37844, 75.7, 260527420, "United States", 1993], + [29580, 78.2, 17932214, "Australia", 1994], + [31505, 77.9, 28995822, "Canada", 1994], + [2323, 69.3, 1216067023, "China", 1994], + [9018, 74.8, 10853435, "Cuba", 1994], + [26301, 76.5, 5086499, "Finland", 1994], + [30303, 77.9, 57991973, "France", 1994], + [33375, 76.4, 81206786, "Germany", 1994], + [27789, 78.8, 264893, "Iceland", 1994], + [1959, 59, 942604211, "India", 1994], + [30746, 79.8, 124101546, "Japan", 1994], + [24716, 76.7, 3623181, "New Zealand", 1994], + [48850, 77.8, 4334434, "Norway", 1994], + [10386, 71.8, 38553355, "Poland", 1994], + [12535, 63.6, 148416292, "Russia", 1994], + [10857, 68.6, 57608769, "Turkey", 1994], + [27691, 76.7, 57736667, "United Kingdom", 1994], + [38892, 75.8, 263301323, "United States", 1994], + [30359, 78.4, 18124770, "Australia", 1995], + [32101, 78, 29299478, "Canada", 1995], + [2551, 69.6, 1227841281, "China", 1995], + [9195, 74.9, 10906048, "Cuba", 1995], + [27303, 76.7, 5108176, "Finland", 1995], + [30823, 78.1, 58224051, "France", 1995], + [33843, 76.6, 81612900, "Germany", 1995], + [27671, 78.9, 267454, "Iceland", 1995], + [2069, 59.3, 960874982, "India", 1995], + [31224, 79.9, 124483305, "Japan", 1995], + [25476, 76.9, 3674886, "New Zealand", 1995], + [50616, 78, 4359788, "Norway", 1995], + [11093, 72, 38591860, "Poland", 1995], + [12013, 64.2, 148293265, "Russia", 1995], + [11530, 69, 58522320, "Turkey", 1995], + [28317, 76.8, 57903790, "United Kingdom", 1995], + [39476, 75.9, 266275528, "United States", 1995], + [31145, 78.6, 18318340, "Australia", 1996], + [32290, 78.3, 29590952, "Canada", 1996], + [2775, 69.9, 1238234851, "China", 1996], + [9871, 75.2, 10955372, "Cuba", 1996], + [28210, 76.9, 5126021, "Finland", 1996], + [31141, 78.4, 58443318, "France", 1996], + [34008, 76.9, 81870772, "Germany", 1996], + [28839, 79.1, 270089, "Iceland", 1996], + [2186, 59.6, 979290432, "India", 1996], + [31958, 80.3, 124794817, "Japan", 1996], + [25984, 77.1, 3717239, "New Zealand", 1996], + [52892, 78.1, 4385951, "Norway", 1996], + [11776, 72.4, 38599825, "Poland", 1996], + [11597, 65.9, 148078355, "Russia", 1996], + [12190, 69.4, 59451488, "Turkey", 1996], + [28998, 76.9, 58079322, "United Kingdom", 1996], + [40501, 76.3, 269483224, "United States", 1996], + [32013, 78.9, 18512971, "Australia", 1997], + [33310, 78.7, 29871092, "Canada", 1997], + [3000, 70.3, 1247259143, "China", 1997], + [10106, 75.3, 11000431, "Cuba", 1997], + [29884, 77.1, 5140755, "Finland", 1997], + [31756, 78.7, 58652709, "France", 1997], + [34578, 77.3, 81993831, "Germany", 1997], + [30009, 79.3, 272798, "Iceland", 1997], + [2235, 60, 997817250, "India", 1997], + [32391, 80.6, 125048424, "Japan", 1997], + [26152, 77.4, 3752102, "New Zealand", 1997], + [55386, 78.2, 4412958, "Norway", 1997], + [12602, 72.7, 38583109, "Poland", 1997], + [11779, 67.4, 147772805, "Russia", 1997], + [12911, 69.8, 60394104, "Turkey", 1997], + [29662, 77.2, 58263858, "United Kingdom", 1997], + [41812, 76.8, 272882865, "United States", 1997], + [33085, 79.1, 18709175, "Australia", 1998], + [34389, 78.9, 30145148, "Canada", 1998], + [3205, 70.7, 1255262566, "China", 1998], + [10086, 75.4, 11041893, "Cuba", 1998], + [31423, 77.3, 5153229, "Finland", 1998], + [32764, 78.8, 58867465, "France", 1998], + [35254, 77.7, 82010184, "Germany", 1998], + [31601, 79.5, 275568, "Iceland", 1998], + [2332, 60.3, 1016402907, "India", 1998], + [31656, 80.6, 125266403, "Japan", 1998], + [26077, 77.8, 3783516, "New Zealand", 1998], + [56502, 78.3, 4440109, "Norway", 1998], + [13225, 73, 38550777, "Poland", 1998], + [11173, 67.6, 147385440, "Russia", 1998], + [13008, 70.4, 61344874, "Turkey", 1998], + [30614, 77.4, 58456989, "United Kingdom", 1998], + [43166, 77, 276354096, "United States", 1998], + [34346, 79.3, 18906936, "Australia", 1999], + [35810, 79.1, 30420216, "Canada", 1999], + [3419, 71.1, 1262713651, "China", 1999], + [10674, 75.6, 11080506, "Cuba", 1999], + [32743, 77.5, 5164780, "Finland", 1999], + [33707, 78.9, 59107738, "France", 1999], + [35931, 77.9, 81965830, "Germany", 1999], + [32521, 79.7, 278376, "Iceland", 1999], + [2496, 60.7, 1034976626, "India", 1999], + [31535, 80.7, 125481050, "Japan", 1999], + [27371, 78.1, 3817489, "New Zealand", 1999], + [57246, 78.5, 4466468, "Norway", 1999], + [13824, 73.2, 38515359, "Poland", 1999], + [11925, 66.2, 146924174, "Russia", 1999], + [12381, 70.3, 62295617, "Turkey", 1999], + [31474, 77.6, 58657794, "United Kingdom", 1999], + [44673, 77.1, 279730801, "United States", 1999], + [35253, 79.7, 19107251, "Australia", 2000], + [37314, 79.3, 30701903, "Canada", 2000], + [3678, 71.5, 1269974572, "China", 2000], + [11268, 75.9, 11116787, "Cuba", 2000], + [34517, 77.8, 5176482, "Finland", 2000], + [34774, 79.1, 59387183, "France", 2000], + [36953, 78.1, 81895925, "Germany", 2000], + [33599, 79.9, 281214, "Iceland", 2000], + [2548, 61.1, 1053481072, "India", 2000], + [32193, 81.1, 125714674, "Japan", 2000], + [27963, 78.5, 3858234, "New Zealand", 2000], + [58699, 78.7, 4491572, "Norway", 2000], + [14565, 73.8, 38486305, "Poland", 2000], + [13173, 65.4, 146400951, "Russia", 2000], + [13025, 71.5, 63240157, "Turkey", 2000], + [32543, 77.8, 58867004, "United Kingdom", 2000], + [45986, 77.1, 282895741, "United States", 2000], + [35452, 80.1, 19308681, "Australia", 2001], + [37563, 79.5, 30991344, "Canada", 2001], + [3955, 71.9, 1277188787, "China", 2001], + [11588, 76.2, 11151472, "Cuba", 2001], + [35327, 78.2, 5188446, "Finland", 2001], + [35197, 79.2, 59711914, "France", 2001], + [37517, 78.3, 81809438, "Germany", 2001], + [34403, 80.2, 284037, "Iceland", 2001], + [2628, 61.5, 1071888190, "India", 2001], + [32230, 81.4, 125974298, "Japan", 2001], + [28752, 78.8, 3906911, "New Zealand", 2001], + [59620, 78.9, 4514907, "Norway", 2001], + [14744, 74.3, 38466543, "Poland", 2001], + [13902, 65.1, 145818121, "Russia", 2001], + [12106, 72, 64182694, "Turkey", 2001], + [33282, 78, 59080221, "United Kingdom", 2001], + [45978, 77.1, 285796198, "United States", 2001], + [36375, 80.4, 19514385, "Australia", 2002], + [38270, 79.7, 31288572, "Canada", 2002], + [4285, 72.4, 1284349938, "China", 2002], + [11715, 76.6, 11184540, "Cuba", 2002], + [35834, 78.5, 5200632, "Finland", 2002], + [35333, 79.4, 60075783, "France", 2002], + [37458, 78.5, 81699829, "Germany", 2002], + [34252, 80.5, 286865, "Iceland", 2002], + [2684, 61.9, 1090189358, "India", 2002], + [32248, 81.7, 126249509, "Japan", 2002], + [29637, 79, 3961695, "New Zealand", 2002], + [60152, 79.2, 4537240, "Norway", 2002], + [14964, 74.6, 38454823, "Poland", 2002], + [14629, 64.9, 145195521, "Russia", 2002], + [12669, 72.5, 65125766, "Turkey", 2002], + [33954, 78.2, 59301235, "United Kingdom", 2002], + [46367, 77.2, 288470847, "United States", 2002], + [37035, 80.7, 19735255, "Australia", 2003], + [38621, 79.9, 31596593, "Canada", 2003], + [4685, 72.9, 1291485488, "China", 2003], + [12123, 76.8, 11214837, "Cuba", 2003], + [36461, 78.6, 5213800, "Finland", 2003], + [35371, 79.7, 60464857, "France", 2003], + [37167, 78.8, 81569481, "Germany", 2003], + [34938, 80.8, 289824, "Iceland", 2003], + [2850, 62.4, 1108369577, "India", 2003], + [32721, 81.8, 126523884, "Japan", 2003], + [30404, 79.3, 4020195, "New Zealand", 2003], + [60351, 79.5, 4560947, "Norway", 2003], + [15508, 74.9, 38451227, "Poland", 2003], + [15768, 64.8, 144583147, "Russia", 2003], + [13151, 72.9, 66060121, "Turkey", 2003], + [35250, 78.5, 59548421, "United Kingdom", 2003], + [47260, 77.3, 291005482, "United States", 2003], + [38130, 81, 19985475, "Australia", 2004], + [39436, 80.1, 31918582, "Canada", 2004], + [5127, 73.4, 1298573031, "China", 2004], + [12791, 76.9, 11240680, "Cuba", 2004], + [37783, 78.6, 5228842, "Finland", 2004], + [36090, 80.1, 60858654, "France", 2004], + [37614, 79.1, 81417791, "Germany", 2004], + [37482, 81.1, 293084, "Iceland", 2004], + [3029, 62.8, 1126419321, "India", 2004], + [33483, 82, 126773081, "Japan", 2004], + [31098, 79.5, 4078779, "New Zealand", 2004], + [62370, 79.7, 4589241, "Norway", 2004], + [16314, 75, 38454520, "Poland", 2004], + [16967, 65, 144043914, "Russia", 2004], + [14187, 73.4, 66973561, "Turkey", 2004], + [35910, 78.8, 59846226, "United Kingdom", 2004], + [48597, 77.6, 293530886, "United States", 2004], + [38840, 81.2, 20274282, "Australia", 2005], + [40284, 80.3, 32256333, "Canada", 2005], + [5675, 73.9, 1305600630, "China", 2005], + [14200, 77.1, 11261052, "Cuba", 2005], + [38700, 78.8, 5246368, "Finland", 2005], + [36395, 80.4, 61241700, "France", 2005], + [37901, 79.4, 81246801, "Germany", 2005], + [39108, 81.3, 296745, "Iceland", 2005], + [3262, 63.2, 1144326293, "India", 2005], + [33916, 82.2, 126978754, "Japan", 2005], + [31798, 79.8, 4134699, "New Zealand", 2005], + [63573, 80.1, 4624388, "Norway", 2005], + [16900, 75, 38463514, "Poland", 2005], + [18118, 64.8, 143622566, "Russia", 2005], + [15176, 73.8, 67860617, "Turkey", 2005], + [36665, 79.1, 60210012, "United Kingdom", 2005], + [49762, 77.7, 296139635, "United States", 2005], + [39416, 81.4, 20606228, "Australia", 2006], + [41012, 80.5, 32611436, "Canada", 2006], + [6360, 74.4, 1312600877, "China", 2006], + [15901, 77.4, 11275199, "Cuba", 2006], + [40115, 79, 5266600, "Finland", 2006], + [37001, 80.7, 61609991, "France", 2006], + [39352, 79.7, 81055904, "Germany", 2006], + [39818, 81.5, 300887, "Iceland", 2006], + [3514, 63.6, 1162088305, "India", 2006], + [34468, 82.3, 127136576, "Japan", 2006], + [32281, 80, 4187584, "New Zealand", 2006], + [64573, 80.4, 4667105, "Norway", 2006], + [17959, 75, 38478763, "Poland", 2006], + [19660, 66.1, 143338407, "Russia", 2006], + [16013, 74.3, 68704721, "Turkey", 2006], + [37504, 79.3, 60648850, "United Kingdom", 2006], + [50599, 77.8, 298860519, "United States", 2006], + [40643, 81.5, 20975949, "Australia", 2007], + [41432, 80.6, 32982275, "Canada", 2007], + [7225, 74.9, 1319625197, "China", 2007], + [17055, 77.6, 11284043, "Cuba", 2007], + [42016, 79.2, 5289333, "Finland", 2007], + [37641, 80.9, 61966193, "France", 2007], + [40693, 79.8, 80854515, "Germany", 2007], + [42598, 81.8, 305415, "Iceland", 2007], + [3806, 64, 1179685631, "India", 2007], + [35183, 82.5, 127250015, "Japan", 2007], + [32928, 80.1, 4238021, "New Zealand", 2007], + [65781, 80.6, 4716584, "Norway", 2007], + [19254, 75.1, 38500356, "Poland", 2007], + [21374, 67.2, 143180249, "Russia", 2007], + [16551, 74.7, 69515492, "Turkey", 2007], + [38164, 79.4, 61151820, "United Kingdom", 2007], + [51011, 78.1, 301655953, "United States", 2007], + [41312, 81.5, 21370348, "Australia", 2008], + [41468, 80.7, 33363256, "Canada", 2008], + [7880, 75.1, 1326690636, "China", 2008], + [17765, 77.8, 11290239, "Cuba", 2008], + [42122, 79.4, 5314170, "Finland", 2008], + [37505, 81, 62309529, "France", 2008], + [41199, 80, 80665906, "Germany", 2008], + [42294, 82, 310033, "Iceland", 2008], + [3901, 64.4, 1197070109, "India", 2008], + [34800, 82.6, 127317900, "Japan", 2008], + [32122, 80.2, 4285380, "New Zealand", 2008], + [65216, 80.7, 4771633, "Norway", 2008], + [19996, 75.3, 38525752, "Poland", 2008], + [22506, 67.6, 143123163, "Russia", 2008], + [16454, 75.1, 70344357, "Turkey", 2008], + [37739, 79.5, 61689620, "United Kingdom", 2008], + [50384, 78.2, 304473143, "United States", 2008], + [41170, 81.6, 21770690, "Australia", 2009], + [39884, 80.9, 33746559, "Canada", 2009], + [8565, 75.6, 1333807063, "China", 2009], + [18035, 77.9, 11297442, "Cuba", 2009], + [38455, 79.7, 5340485, "Finland", 2009], + [36215, 81, 62640901, "France", 2009], + [38975, 80, 80519685, "Germany", 2009], + [39979, 82.2, 314336, "Iceland", 2009], + [4177, 64.7, 1214182182, "India", 2009], + [32880, 82.8, 127340884, "Japan", 2009], + [31723, 80.3, 4329124, "New Zealand", 2009], + [63354, 80.8, 4830371, "Norway", 2009], + [20507, 75.6, 38551489, "Poland", 2009], + [20739, 68.3, 143126660, "Russia", 2009], + [15467, 75.4, 71261307, "Turkey", 2009], + [35840, 79.7, 62221164, "United Kingdom", 2009], + [48558, 78.3, 307231961, "United States", 2009], + [41330, 81.7, 22162863, "Australia", 2010], + [40773, 81.1, 34126173, "Canada", 2010], + [9430, 75.9, 1340968737, "China", 2010], + [18477, 78, 11308133, "Cuba", 2010], + [39425, 80, 5367693, "Finland", 2010], + [36745, 81.2, 62961136, "France", 2010], + [40632, 80.2, 80435307, "Germany", 2010], + [38809, 82.5, 318042, "Iceland", 2010], + [4547, 65.1, 1230984504, "India", 2010], + [34404, 83, 127319802, "Japan", 2010], + [31824, 80.5, 4369027, "New Zealand", 2010], + [62946, 80.9, 4891251, "Norway", 2010], + [21328, 76.1, 38574682, "Poland", 2010], + [21664, 68.7, 143158099, "Russia", 2010], + [16674, 75.7, 72310416, "Turkey", 2010], + [36240, 80, 62716684, "United Kingdom", 2010], + [49373, 78.5, 309876170, "United States", 2010], + [41706, 81.8, 22542371, "Australia", 2011], + [41567, 81.3, 34499905, "Canada", 2011], + [10274, 76.1, 1348174478, "China", 2011], + [19005, 78.1, 11323570, "Cuba", 2011], + [40251, 80.3, 5395816, "Finland", 2011], + [37328, 81.4, 63268405, "France", 2011], + [42080, 80.3, 80424665, "Germany", 2011], + [39619, 82.7, 321030, "Iceland", 2011], + [4787, 65.5, 1247446011, "India", 2011], + [34316, 82.8, 127252900, "Japan", 2011], + [32283, 80.6, 4404483, "New Zealand", 2011], + [62737, 81.1, 4953945, "Norway", 2011], + [22333, 76.5, 38594217, "Poland", 2011], + [22570, 69.4, 143211476, "Russia", 2011], + [17908, 76, 73517002, "Turkey", 2011], + [36549, 80.4, 63164949, "United Kingdom", 2011], + [49781, 78.7, 312390368, "United States", 2011], + [42522, 81.8, 22911375, "Australia", 2012], + [41865, 81.4, 34868151, "Canada", 2012], + [11017, 76.3, 1355386952, "China", 2012], + [19586, 78.2, 11342631, "Cuba", 2012], + [39489, 80.5, 5424644, "Finland", 2012], + [37227, 81.6, 63561798, "France", 2012], + [42959, 80.5, 80477952, "Germany", 2012], + [39925, 82.8, 323407, "Iceland", 2012], + [4967, 65.9, 1263589639, "India", 2012], + [34988, 83.2, 127139821, "Japan", 2012], + [32806, 80.6, 4435883, "New Zealand", 2012], + [63620, 81.3, 5018367, "Norway", 2012], + [22740, 76.7, 38609486, "Poland", 2012], + [23299, 70.4, 143287536, "Russia", 2012], + [18057, 76.2, 74849187, "Turkey", 2012], + [36535, 80.8, 63573766, "United Kingdom", 2012], + [50549, 78.8, 314799465, "United States", 2012], + [42840, 81.8, 23270465, "Australia", 2013], + [42213, 81.5, 35230612, "Canada", 2013], + [11805, 76.5, 1362514260, "China", 2013], + [20122, 78.3, 11362505, "Cuba", 2013], + [38788, 80.6, 5453061, "Finland", 2013], + [37309, 81.7, 63844529, "France", 2013], + [42887, 80.7, 80565861, "Germany", 2013], + [40958, 82.8, 325392, "Iceland", 2013], + [5244, 66.2, 1279498874, "India", 2013], + [35614, 83.3, 126984964, "Japan", 2013], + [33360, 80.6, 4465276, "New Zealand", 2013], + [63322, 81.4, 5083450, "Norway", 2013], + [23144, 76.9, 38618698, "Poland", 2013], + [23561, 71.3, 143367341, "Russia", 2013], + [18579, 76.3, 76223639, "Turkey", 2013], + [36908, 81, 63955654, "United Kingdom", 2013], + [51282, 78.9, 317135919, "United States", 2013], + [43219, 81.8, 23622353, "Australia", 2014], + [42817, 81.6, 35587793, "Canada", 2014], + [12609, 76.7, 1369435670, "China", 2014], + [20704, 78.4, 11379111, "Cuba", 2014], + [38569, 80.7, 5479660, "Finland", 2014], + [37218, 81.8, 64121249, "France", 2014], + [43444, 80.9, 80646262, "Germany", 2014], + [41237, 82.8, 327318, "Iceland", 2014], + [5565, 66.5, 1295291543, "India", 2014], + [35635, 83.4, 126794564, "Japan", 2014], + [33538, 80.6, 4495482, "New Zealand", 2014], + [64020, 81.5, 5147970, "Norway", 2014], + [23952, 77.1, 38619974, "Poland", 2014], + [23293, 72.21, 143429435, "Russia", 2014], + [18884, 76.4, 77523788, "Turkey", 2014], + [37614, 81.2, 64331348, "United Kingdom", 2014], + [52118, 79, 319448634, "United States", 2014], + [44056, 81.8, 23968973, "Australia", 2015], + [43294, 81.7, 35939927, "Canada", 2015], + [13334, 76.9, 1376048943, "China", 2015], + [21291, 78.5, 11389562, "Cuba", 2015], + [38923, 80.8, 5503457, "Finland", 2015], + [37599, 81.9, 64395345, "France", 2015], + [44053, 81.1, 80688545, "Germany", 2015], + [42182, 82.8, 329425, "Iceland", 2015], + [5903, 66.8, 1311050527, "India", 2015], + [36162, 83.5, 126573481, "Japan", 2015], + [34186, 80.6, 4528526, "New Zealand", 2015], + [64304, 81.6, 5210967, "Norway", 2015], + [24787, 77.3, 38611794, "Poland", 2015], + [23038, 73.13, 143456918, "Russia", 2015], + [19360, 76.5, 78665830, "Turkey", 2015], + [38225, 81.4, 64715810, "United Kingdom", 2015], + [53354, 79.1, 321773631, "United States", 2015] + ], + defaultDatasourceParallel: [ + ['Price', 'Net Weight', 'Amount', 'Score'], + [12.99, 100, 82, 'Good'], + [9.99, 80, 77, 'OK'], + [20, 120, 60, 'Excellent'] + ], + defaultDatasource3DGlobe: [[[-75.440806,40.652083],[-80.943139,35.214]],[[-75.440806,40.652083],[-75.241139,39.871944]],[[-99.681897,32.411319],[-97.037997,32.896828]],[[-106.6091944,35.0402222],[-97.037997,32.896828]],[[-106.6091944,35.0402222],[-118.408075,33.942536]],[[-106.6091944,35.0402222],[-87.904842,41.978603]],[[-106.6091944,35.0402222],[-112.011583,33.434278]],[[-2.197778,57.201944],[-0.461389,51.4775]],[[-0.166786,5.605186],[-0.461389,51.4775]],[[-97.230519,31.611289],[-97.037997,32.896828]],[[138.530556,-34.945],[153.1175,-27.384167]],[[138.530556,-34.945],[151.177222,-33.946111]],[[-92.549833,31.3274],[-97.037997,32.896828]],[[-4.499106,36.6749],[-0.461389,51.4775]],[[-81.9645,33.369944],[-80.943139,35.214]],[[-81.9645,33.369944],[-77.037722,38.852083]],[[-102.317858,21.705558],[-97.037997,32.896828]],[[174.791667,-37.008056],[153.1175,-27.384167]],[[174.791667,-37.008056],[-149.611389,-17.556667]],[[174.791667,-37.008056],[151.177222,-33.946111]],[[-73.801692,42.748267],[-80.943139,35.214]],[[-73.801692,42.748267],[-77.037722,38.852083]],[[-73.801692,42.748267],[-75.241139,39.871944]],[[-92.4003,42.5571],[-87.904842,41.978603]],[[-101.705931,35.219369],[-97.037997,32.896828]],[[35.993214,31.722556],[-73.778925,40.639751]],[[35.993214,31.722556],[-87.904842,41.978603]],[[35.993214,31.722556],[-73.740833,45.470556]],[[4.763889,52.308613],[-0.461389,51.4775]],[[4.763889,52.308613],[-75.241139,39.871944]],[[-149.996361,61.174361],[-118.408075,33.942536]],[[-149.996361,61.174361],[-112.011583,33.434278]],[[-61.792667,17.136749],[-80.943139,35.214]],[[-61.792667,17.136749],[-73.778925,40.639751]],[[-61.792667,17.136749],[-80.290556,25.79325]],[[-71.583083,-16.341072],[-77.114319,-12.021889]],[[17.918611,59.651944],[-0.461389,51.4775]],[[-76.021739,43.991922],[-87.904842,41.978603]],[[-76.021739,43.991922],[-75.241139,39.871944]],[[133.902222,-23.806667],[151.177222,-33.946111]],[[-57.519133,-25.23985],[-80.290556,25.79325]],[[23.944467,37.936358],[-0.461389,51.4775]],[[23.944467,37.936358],[-75.241139,39.871944]],[[-84.428067,33.636719],[-80.943139,35.214]],[[-84.428067,33.636719],[-97.037997,32.896828]],[[-84.428067,33.636719],[-0.461389,51.4775]],[[-84.428067,33.636719],[-80.290556,25.79325]],[[-84.428067,33.636719],[-87.904842,41.978603]],[[-84.428067,33.636719],[-75.241139,39.871944]],[[-84.428067,33.636719],[-112.011583,33.434278]],[[-70.015221,12.501389],[-80.943139,35.214]],[[-70.015221,12.501389],[-80.290556,25.79325]],[[-70.015221,12.501389],[-75.241139,39.871944]],[[54.651138,24.432972],[79.884117,7.180756]],[[54.651138,24.432972],[6.766775,51.289453]],[[54.651138,24.432972],[-77.455811,38.944533]],[[54.651138,24.432972],[73.099233,33.616653]],[[54.651138,24.432972],[-73.778925,40.639751]],[[54.651138,24.432972],[74.403594,31.521564]],[[54.651138,24.432972],[-0.461389,51.4775]],[[54.651138,24.432972],[58.284444,23.593278]],[[54.651138,24.432972],[-87.904842,41.978603]],[[-97.669889,30.194528],[-80.943139,35.214]],[[-97.669889,30.194528],[-97.037997,32.896828]],[[-97.669889,30.194528],[-73.778925,40.639751]],[[-97.669889,30.194528],[-118.408075,33.942536]],[[-97.669889,30.194528],[-0.461389,51.4775]],[[-97.669889,30.194528],[-90.258028,29.993389]],[[-97.669889,30.194528],[-87.904842,41.978603]],[[-97.669889,30.194528],[-75.241139,39.871944]],[[-97.669889,30.194528],[-112.011583,33.434278]],[[-82.541806,35.436194],[-80.943139,35.214]],[[-75.723403,41.338478],[-80.943139,35.214]],[[-75.723403,41.338478],[-75.241139,39.871944]],[[-85.552058,42.234875],[-87.904842,41.978603]],[[50.63361,26.270834],[51.565056,25.261125]],[[50.63361,26.270834],[-0.461389,51.4775]],[[2.078464,41.297078],[-73.778925,40.639751]],[[2.078464,41.297078],[-0.461389,51.4775]],[[2.078464,41.297078],[-80.290556,25.79325]],[[2.078464,41.297078],[-75.241139,39.871944]],[[-64.678703,32.364042],[-73.778925,40.639751]],[[-64.678703,32.364042],[-80.290556,25.79325]],[[-64.678703,32.364042],[-75.241139,39.871944]],[[-72.683222,41.938889],[-80.943139,35.214]],[[-72.683222,41.938889],[-77.037722,38.852083]],[[-72.683222,41.938889],[-97.037997,32.896828]],[[-72.683222,41.938889],[-118.408075,33.942536]],[[-72.683222,41.938889],[-80.290556,25.79325]],[[-72.683222,41.938889],[-87.904842,41.978603]],[[-72.683222,41.938889],[-75.241139,39.871944]],[[-72.683222,41.938889],[-80.232872,40.491467]],[[-119.05677,35.433598],[-112.011583,33.434278]],[[-59.492456,13.074603],[-80.290556,25.79325]],[[-75.979839,42.208689],[-75.241139,39.871944]],[[5.218142,60.293386],[-0.461389,51.4775]],[[-68.828139,44.807444],[-77.037722,38.852083]],[[-68.828139,44.807444],[-75.241139,39.871944]],[[-5.8725,54.618056],[-0.461389,51.4775]],[[-86.75355,33.562942],[-80.943139,35.214]],[[-86.75355,33.562942],[-77.037722,38.852083]],[[-86.75355,33.562942],[-97.037997,32.896828]],[[-86.75355,33.562942],[-80.290556,25.79325]],[[-86.75355,33.562942],[-75.241139,39.871944]],[[-16.652206,13.337961],[-17.490225,14.739708]],[[-101.480847,20.993464],[-97.037997,32.896828]],[[100.747283,13.681108],[101.709917,2.745578]]], }; diff --git a/client/packages/lowcoder-comps/src/i18n/comps/locales/types.tsx b/client/packages/lowcoder-comps/src/i18n/comps/locales/types.tsx index 80cb52174..1276360a0 100644 --- a/client/packages/lowcoder-comps/src/i18n/comps/locales/types.tsx +++ b/client/packages/lowcoder-comps/src/i18n/comps/locales/types.tsx @@ -29,4 +29,6 @@ export type I18nObjects = { imageEditorLocale?: Record; defaultPieBg: string; usaMap: Record; + defaultDatasourceBoxplot: unknown[]; + defaultDatasourceParallel: unknown[]; }; diff --git a/client/packages/lowcoder-comps/src/index.ts b/client/packages/lowcoder-comps/src/index.ts index 9ceb60c66..4d621f71b 100644 --- a/client/packages/lowcoder-comps/src/index.ts +++ b/client/packages/lowcoder-comps/src/index.ts @@ -23,6 +23,9 @@ import { BarChartCompWithDefault } from "comps/barChartComp/barChartComp"; import { LineChartCompWithDefault } from "comps/lineChartComp/lineChartComp"; import { PieChartCompWithDefault } from "comps/pieChartComp/pieChartComp"; import { ScatterChartCompWithDefault } from "comps/scatterChartComp/scatterChartComp"; +import { BoxplotChartCompWithDefault } from "comps/boxplotChartComp/boxplotChartComp"; +import { ParallelChartCompWithDefault } from "comps/parallelChartComp/parallelChartComp"; +import { Line3DChartCompWithDefault } from "comps/line3dChartComp/line3dChartComp"; export default { chart: ChartCompWithDefault, @@ -31,6 +34,9 @@ export default { lineChart: LineChartCompWithDefault, pieChart: PieChartCompWithDefault, scatterChart: ScatterChartCompWithDefault, + boxplotChart: BoxplotChartCompWithDefault, + parallelChart: ParallelChartCompWithDefault, + line3dChart: Line3DChartCompWithDefault, chartsGeoMap: ChartsGeoMapComp, funnelChart: FunnelChartCompWithDefault, gaugeChart: GaugeChartCompWithDefault, diff --git a/client/yarn.lock b/client/yarn.lock index cbdfec3bc..7fae135fa 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -7392,6 +7392,13 @@ __metadata: languageName: node linkType: hard +"claygl@npm:^1.2.1": + version: 1.3.0 + resolution: "claygl@npm:1.3.0" + checksum: cbf3c4788b426ecc183e0fc5f7e3f88fae15d616ebf39467cb719c1f78efbef8bbe92f8def22c927a9d3cbb2a3ae6d1194755edae96d5f623b4dca0b78bdefa8 + languageName: node + linkType: hard + "clean-css@npm:^5.2.2": version: 5.3.3 resolution: "clean-css@npm:5.3.3" @@ -9287,6 +9294,18 @@ coolshapes-react@lowcoder-org/coolshapes-react: languageName: node linkType: hard +"echarts-gl@npm:^2.0.9": + version: 2.0.9 + resolution: "echarts-gl@npm:2.0.9" + dependencies: + claygl: ^1.2.1 + zrender: ^5.1.1 + peerDependencies: + echarts: ^5.1.2 + checksum: d07dfeb093c5ca05a671317a8f4f4be7fffaa12fb91d485ab19c65d740bbf3c08b02b57c4d7b772bc3ce025184843f1a44ba8bdfc3d48257a46684a5d10fb941 + languageName: node + linkType: hard + "echarts-wordcloud@npm:^2.1.0": version: 2.1.0 resolution: "echarts-wordcloud@npm:2.1.0" @@ -13985,6 +14004,7 @@ coolshapes-react@lowcoder-org/coolshapes-react: agora-rtm-sdk: ^1.5.1 big.js: ^6.2.1 echarts-extension-gmap: ^1.6.0 + echarts-gl: ^2.0.9 echarts-wordcloud: ^2.1.0 jest: 29.3.0 lowcoder-cli: "workspace:^" @@ -22735,6 +22755,15 @@ coolshapes-react@lowcoder-org/coolshapes-react: languageName: node linkType: hard +"zrender@npm:^5.1.1": + version: 5.6.1 + resolution: "zrender@npm:5.6.1" + dependencies: + tslib: 2.3.0 + checksum: 01caeac2d30f0083009aafa531ccb7fe991b6ac0ddd8134dc7b0015f794ed7e3d4fbfe5d32f61cb591014245eca15aeebcfc962cdebfe3829598f0c94ba3dc29 + languageName: node + linkType: hard + "zwitch@npm:^2.0.0": version: 2.0.4 resolution: "zwitch@npm:2.0.4"