@visactor/vtable 1.22.5-alpha.1 → 1.22.5-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/cjs/PivotChart.js +4 -4
  2. package/cjs/PivotChart.js.map +1 -1
  3. package/cjs/core/BaseTable.js +1 -1
  4. package/cjs/core/BaseTable.js.map +1 -1
  5. package/cjs/core/style-helper.js +1 -2
  6. package/cjs/dataset/dataset-pivot-table.js +2 -1
  7. package/cjs/index.d.ts +1 -1
  8. package/cjs/index.js +1 -1
  9. package/cjs/index.js.map +1 -1
  10. package/cjs/layout/chart-helper/get-axis-config.js +10 -6
  11. package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
  12. package/cjs/layout/chart-helper/get-chart-spec.js +6 -2
  13. package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
  14. package/cjs/layout/pivot-header-layout.js +20 -4
  15. package/cjs/layout/pivot-header-layout.js.map +1 -1
  16. package/cjs/plugins/index.js +1 -1
  17. package/cjs/scenegraph/graphic/active-cell-chart-list.js +18 -2
  18. package/cjs/scenegraph/graphic/active-cell-chart-list.js.map +1 -1
  19. package/cjs/scenegraph/graphic/chart.d.ts +3 -0
  20. package/cjs/scenegraph/graphic/chart.js +45 -13
  21. package/cjs/scenegraph/graphic/chart.js.map +1 -1
  22. package/cjs/scenegraph/refresh-node/update-chart.js +1 -1
  23. package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
  24. package/cjs/ts-types/theme.d.ts +4 -4
  25. package/cjs/ts-types/theme.js.map +1 -1
  26. package/cjs/vrender.js.map +1 -1
  27. package/dist/vtable.js +200 -25
  28. package/dist/vtable.min.js +2 -2
  29. package/es/PivotChart.js +4 -4
  30. package/es/PivotChart.js.map +1 -1
  31. package/es/core/BaseTable.js +1 -1
  32. package/es/core/BaseTable.js.map +1 -1
  33. package/es/core/style-helper.js +1 -2
  34. package/es/dataset/dataset-pivot-table.js +2 -1
  35. package/es/index.d.ts +1 -1
  36. package/es/index.js +1 -1
  37. package/es/index.js.map +1 -1
  38. package/es/layout/chart-helper/get-axis-config.js +10 -6
  39. package/es/layout/chart-helper/get-axis-config.js.map +1 -1
  40. package/es/layout/chart-helper/get-chart-spec.js +5 -3
  41. package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
  42. package/es/layout/pivot-header-layout.js +20 -4
  43. package/es/layout/pivot-header-layout.js.map +1 -1
  44. package/es/plugins/index.js +1 -1
  45. package/es/scenegraph/graphic/active-cell-chart-list.js +18 -2
  46. package/es/scenegraph/graphic/active-cell-chart-list.js.map +1 -1
  47. package/es/scenegraph/graphic/chart.d.ts +3 -0
  48. package/es/scenegraph/graphic/chart.js +43 -13
  49. package/es/scenegraph/graphic/chart.js.map +1 -1
  50. package/es/scenegraph/refresh-node/update-chart.js +1 -1
  51. package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
  52. package/es/ts-types/theme.d.ts +4 -4
  53. package/es/ts-types/theme.js.map +1 -1
  54. package/es/vrender.js.map +1 -1
  55. package/package.json +4 -4
  56. package/cjs/layout/pivot-layout.d.ts +0 -1
  57. package/cjs/layout/pivot-layout.js +0 -1
  58. package/cjs/layout/pivot-layout.js.map +0 -1
  59. package/es/layout/pivot-layout.d.ts +0 -1
  60. package/es/layout/pivot-layout.js +0 -1
  61. package/es/layout/pivot-layout.js.map +0 -1
@@ -126,16 +126,16 @@ export interface ITableThemeDefine {
126
126
  axisStyle?: {
127
127
  defaultAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'>;
128
128
  leftAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'> & {
129
- cellPaddingLeft: number;
129
+ cellPaddingLeft?: number;
130
130
  };
131
131
  rightAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'> & {
132
- cellPaddingRight: number;
132
+ cellPaddingRight?: number;
133
133
  };
134
134
  topAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'> & {
135
- cellPaddingTop: number;
135
+ cellPaddingTop?: number;
136
136
  };
137
137
  bottomAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'> & {
138
- cellPaddingBottom: number;
138
+ cellPaddingBottom?: number;
139
139
  };
140
140
  };
141
141
  checkboxStyle?: CheckboxStyle;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ts-types/theme.ts"],"names":[],"mappings":"","file":"theme.js","sourcesContent":["/* eslint-disable sort-imports */\nimport type { ColorsDef, LineDashsDef, LineWidthsDef, LineWidthsPropertyDefine, LineDashsPropertyDefine } from '.';\nimport type { ButtonStyle, CheckboxStyle, ITextStyleOption, RadioStyle, SwitchStyle } from './column/style';\nimport type { ColorPropertyDefine, ColorsPropertyDefine } from './style-define';\nimport type { ICellAxisOption } from './component/axis';\nimport type { PopTipAttributes } from './../vrender';\n// ****** Custom Theme *******\nexport type PartialTableThemeDefine = Partial<ITableThemeDefine>;\nexport type ThemeStyle = ITextStyleOption & {\n hover?: Omit<InteractionStyle, 'cellBorderColor' | 'cellBorderLineWidth'>; //鼠标hover到某个单元格\n select?: {\n inlineRowBgColor?: ColorPropertyDefine; //交互所在整行的背景颜色\n inlineColumnBgColor?: ColorPropertyDefine; //交互所在整列的背景颜色\n cellBgColor?: ColorPropertyDefine; //交互所在单元格的背景颜色\n };\n frameStyle?: FrameStyle;\n};\nexport type InteractionStyle = {\n cellBorderColor?: ColorsPropertyDefine; //交互所在单元格的边框颜色\n cellBorderLineWidth?: LineWidthsPropertyDefine;\n // cellBorderLineDash?:LineDashsPropertyDefine,//用到的场景应该不多\n cellBgColor?: ColorPropertyDefine; //交互所在单元格的背景颜色\n // inlineRowBorderColor?: ColorsPropertyDefine,//交互所在整行的边框颜色\n inlineRowBgColor?: ColorPropertyDefine; //交互所在整行的背景颜色\n // inlineColBorderColor?: ColorsPropertyDefine,//交互所在整列的边框颜色\n inlineColumnBgColor?: ColorPropertyDefine; //交互所在整列的背景颜色\n // headerHighlightBorderColor?:ColorPropertyDefine,//表头底部高亮线\n};\nexport type FrameStyle = {\n borderColor?: ColorsDef;\n borderLineWidth?: LineWidthsDef;\n borderLineDash?: LineDashsDef;\n innerBorder?: boolean;\n};\nexport type TableFrameStyle = FrameStyle & {\n shadowBlur?: number; //阴影宽度\n shadowOffsetX?: number; //x方向偏移\n shadowOffsetY?: number; //Y方向偏移\n shadowColor?: string; //阴影颜色\n cornerRadius?: number | [number, number, number, number]; //边框圆角半径\n};\nexport type menuStyle = {\n color?: string;\n highlightColor?: string;\n fontSize?: number;\n fontFamily?: string;\n highlightFontSize?: number;\n highlightFontFamily?: string;\n hoverBgColor?: string;\n};\nexport type ScrollStyle = {\n /**滚动条滚动的颜色 */\n scrollRailColor?: string;\n /**滚动条滑块的颜色 */\n scrollSliderColor?: string;\n /**滚动条滑块的圆角半径 */\n scrollSliderCornerRadius?: number;\n /**滚动条宽度大小 */\n width?: number;\n /**滚动条是否可见 'always' | 'scrolling' | 'none' | 'focus',常驻|滚动时|不显示|聚焦在画布上时 。默认'scrolling'*/\n visible?: 'always' | 'scrolling' | 'none' | 'focus';\n horizontalVisible?: 'always' | 'scrolling' | 'none' | 'focus';\n verticalVisible?: 'always' | 'scrolling' | 'none' | 'focus';\n /*** 悬浮与容器上,还是独立于容器外 */\n hoverOn?: boolean;\n /** 是否显示到容器的边缘 尽管内容没有撑满的情况下 默认false */\n barToSide?: boolean;\n /** 横向滚动条 padding */\n horizontalPadding?: number | [number, number, number, number];\n /** 竖向滚动条 padding */\n verticalPadding?: number | [number, number, number, number];\n ignoreFrozenCols?: boolean; // 忽略所有冻结列宽度,默认false\n};\n/**\n * 气泡框,按钮的的解释信息\n */\nexport type TooltipStyle = {\n fontFamily?: string;\n fontSize?: number;\n color?: string;\n padding?: number[];\n bgColor?: string;\n maxWidth?: number;\n maxHeight?: number;\n /** !目前未实现该逻辑。触发行为:hover or click */\n // trigger?: string | string[];\n /**气泡框位置,可选 top left right bottom */\n // placement?: Placement;\n};\nexport interface ITableThemeDefine {\n /** 表格绘制范围外的canvas上填充的颜色 */\n underlayBackgroundColor?: string;\n // selectionBgColor?: ColorPropertyDefine; //多选单元格背景色 手动设置的多选 非框选\n defaultStyle?: ThemeStyle;\n cornerHeaderStyle?: ThemeStyle; //角头样式\n cornerRightTopCellStyle?: ThemeStyle; // 右上角占位单元格样式\n cornerLeftBottomCellStyle?: ThemeStyle; // 左下角占位单元格样式\n cornerRightBottomCellStyle?: ThemeStyle; // 右下角占位单元格样式\n rightFrozenStyle?: ThemeStyle; // 右侧冻结单元格样式\n bottomFrozenStyle?: ThemeStyle; // 下部冻结单元格样式\n headerStyle?: ThemeStyle;\n rowHeaderStyle?: ThemeStyle;\n bodyStyle?: ThemeStyle;\n groupTitleStyle?: ThemeStyle;\n frameStyle?: TableFrameStyle;\n //列调整宽度的直线\n columnResize?: {\n visibleOnHover?: boolean; //是否在hover时显示\n lineColor?: ColorPropertyDefine; //上面线的颜色\n bgColor?: ColorPropertyDefine; //背景线的颜色\n lineWidth?: number; //上面线的宽度\n width?: number; //背景线的宽度\n resizeHotSpotSize?: number; //响应调整行高列宽交互行为热区的大小\n labelVisible?: boolean; //是否显示label\n labelColor?: string; //label的颜色\n labelFontSize?: number; //label的字体大小\n labelFontFamily?: string; //label的字体\n labelBackgroundFill?: string; //label的背景填充\n labelBackgroundCornerRadius?: number; //label的背景圆角\n };\n //拖拽表格换位分割线的样式\n dragHeaderSplitLine?: {\n lineColor: ColorPropertyDefine; //上面线的颜色\n lineWidth: number; //上面线的宽度\n shadowBlockColor?: string; //拖拽时阴影区域的颜色\n };\n //冻结列后面的效果\n frozenColumnLine?: {\n shadow?: {\n //默认效果 会有阴影配置\n width: number; //阴影整体宽度\n startColor: string; //开始颜色\n endColor: string; //结束颜色\n /**滚动条是否可见 'always' | 'scrolling' | 'none' | 'focus',常驻|滚动时|不显示|聚焦在画布上时 。默认'scrolling'*/\n visible?: 'always' | 'scrolling';\n };\n /** TODO 暂未生效 */\n border?: {\n //有些需求要两种效果 这里配置滚动前的边框效果(实现方式是两条线叠加产生),滚动后按上面的阴影效果\n lineColor: ColorPropertyDefine; //上面线的颜色\n bgColor?: ColorPropertyDefine; //背景线的颜色\n lineWidth: number; //上面线的宽度\n width?: number; //背景线的宽度\n };\n };\n\n // menuStyle?: menuStyle;\n scrollStyle?: ScrollStyle;\n tooltipStyle?: TooltipStyle;\n // selectHeaderHighlight?: boolean;\n /** 选择框样式 */\n selectionStyle?: //Omit<InteractionStyle, 'inlineRowBgColor' | 'inlineColumnBgColor'>; //鼠标点击到某个单元格\n {\n cellBorderColor?: string; //边框颜色\n cellBorderLineWidth?: number; //边框线宽度\n cellBgColor?: string; //选择框背景颜色\n inlineRowBgColor?: string; //交互所在整行的背景颜色\n inlineColumnBgColor?: string; //交互所在整列的背景颜色\n selectionFillMode?: 'overlay' | 'replace'; //选择框填充模式,overlay表示选择框背景色覆盖在表格上(需要配饰透明度),replace表示背景色替换原有单元格的背景色\n dynamicUpdateSelectionSize?: boolean; // 选择框大小随滚动动态变化,用于冻结并且背景透明的场景,默认false,开启后性能会有一定影响\n };\n\n // style for axis\n axisStyle?: {\n defaultAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'>;\n leftAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'> & {\n cellPaddingLeft: number;\n };\n rightAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'> & {\n cellPaddingRight: number;\n };\n topAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'> & {\n cellPaddingTop: number;\n };\n bottomAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'> & {\n cellPaddingBottom: number;\n };\n };\n\n checkboxStyle?: CheckboxStyle;\n radioStyle?: RadioStyle;\n switchStyle?: SwitchStyle;\n buttonStyle?: ButtonStyle;\n\n // style for text pop tip\n textPopTipStyle?: PopTipAttributes;\n\n // senior config for fs\n // 表格四侧单元格,靠近边缘的border是否需要再绘制;如配置false的话,当表格左侧frame未设置情况下左侧单元格不显示左边框,其他方向同理\n cellInnerBorder?: boolean;\n // cell border clip direction\n cellBorderClipDirection?: 'top-left' | 'bottom-right'; // default is 'top-left'\n // text offset, hack for fs\n _contentOffset?: number;\n /** 内部功能性按钮图标颜色及尺寸配置 */\n functionalIconsStyle?: {\n sort_color?: string;\n sort_color_opacity?: string;\n sort_color_2?: string;\n sort_color_opacity_2?: string;\n sort_size?: number;\n sort_size_2?: number;\n frozen_color?: string;\n frozen_color_opacity?: string;\n frozen_color_2?: string;\n frozen_color_opacity_2?: string;\n frozen_size?: number;\n frozen_size_2?: number;\n collapse_color?: string;\n collapse_color_opacity?: string;\n collapse_size?: number;\n collapse_size_2?: number;\n expand_color?: string;\n expand_color_opacity?: string;\n expand_size?: number;\n expand_size_2?: number;\n dragReorder_color?: string;\n dragReorder_color_opacity?: string;\n dragReorder_size?: number;\n };\n}\n\nexport type RequiredTableThemeDefine = Required<ITableThemeDefine>;\n"]}
1
+ {"version":3,"sources":["../src/ts-types/theme.ts"],"names":[],"mappings":"","file":"theme.js","sourcesContent":["/* eslint-disable sort-imports */\nimport type { ColorsDef, LineDashsDef, LineWidthsDef, LineWidthsPropertyDefine, LineDashsPropertyDefine } from '.';\nimport type { ButtonStyle, CheckboxStyle, ITextStyleOption, RadioStyle, SwitchStyle } from './column/style';\nimport type { ColorPropertyDefine, ColorsPropertyDefine } from './style-define';\nimport type { ICellAxisOption } from './component/axis';\nimport type { PopTipAttributes } from './../vrender';\n// ****** Custom Theme *******\nexport type PartialTableThemeDefine = Partial<ITableThemeDefine>;\nexport type ThemeStyle = ITextStyleOption & {\n hover?: Omit<InteractionStyle, 'cellBorderColor' | 'cellBorderLineWidth'>; //鼠标hover到某个单元格\n select?: {\n inlineRowBgColor?: ColorPropertyDefine; //交互所在整行的背景颜色\n inlineColumnBgColor?: ColorPropertyDefine; //交互所在整列的背景颜色\n cellBgColor?: ColorPropertyDefine; //交互所在单元格的背景颜色\n };\n frameStyle?: FrameStyle;\n};\nexport type InteractionStyle = {\n cellBorderColor?: ColorsPropertyDefine; //交互所在单元格的边框颜色\n cellBorderLineWidth?: LineWidthsPropertyDefine;\n // cellBorderLineDash?:LineDashsPropertyDefine,//用到的场景应该不多\n cellBgColor?: ColorPropertyDefine; //交互所在单元格的背景颜色\n // inlineRowBorderColor?: ColorsPropertyDefine,//交互所在整行的边框颜色\n inlineRowBgColor?: ColorPropertyDefine; //交互所在整行的背景颜色\n // inlineColBorderColor?: ColorsPropertyDefine,//交互所在整列的边框颜色\n inlineColumnBgColor?: ColorPropertyDefine; //交互所在整列的背景颜色\n // headerHighlightBorderColor?:ColorPropertyDefine,//表头底部高亮线\n};\nexport type FrameStyle = {\n borderColor?: ColorsDef;\n borderLineWidth?: LineWidthsDef;\n borderLineDash?: LineDashsDef;\n innerBorder?: boolean;\n};\nexport type TableFrameStyle = FrameStyle & {\n shadowBlur?: number; //阴影宽度\n shadowOffsetX?: number; //x方向偏移\n shadowOffsetY?: number; //Y方向偏移\n shadowColor?: string; //阴影颜色\n cornerRadius?: number | [number, number, number, number]; //边框圆角半径\n};\nexport type menuStyle = {\n color?: string;\n highlightColor?: string;\n fontSize?: number;\n fontFamily?: string;\n highlightFontSize?: number;\n highlightFontFamily?: string;\n hoverBgColor?: string;\n};\nexport type ScrollStyle = {\n /**滚动条滚动的颜色 */\n scrollRailColor?: string;\n /**滚动条滑块的颜色 */\n scrollSliderColor?: string;\n /**滚动条滑块的圆角半径 */\n scrollSliderCornerRadius?: number;\n /**滚动条宽度大小 */\n width?: number;\n /**滚动条是否可见 'always' | 'scrolling' | 'none' | 'focus',常驻|滚动时|不显示|聚焦在画布上时 。默认'scrolling'*/\n visible?: 'always' | 'scrolling' | 'none' | 'focus';\n horizontalVisible?: 'always' | 'scrolling' | 'none' | 'focus';\n verticalVisible?: 'always' | 'scrolling' | 'none' | 'focus';\n /*** 悬浮与容器上,还是独立于容器外 */\n hoverOn?: boolean;\n /** 是否显示到容器的边缘 尽管内容没有撑满的情况下 默认false */\n barToSide?: boolean;\n /** 横向滚动条 padding */\n horizontalPadding?: number | [number, number, number, number];\n /** 竖向滚动条 padding */\n verticalPadding?: number | [number, number, number, number];\n ignoreFrozenCols?: boolean; // 忽略所有冻结列宽度,默认false\n};\n/**\n * 气泡框,按钮的的解释信息\n */\nexport type TooltipStyle = {\n fontFamily?: string;\n fontSize?: number;\n color?: string;\n padding?: number[];\n bgColor?: string;\n maxWidth?: number;\n maxHeight?: number;\n /** !目前未实现该逻辑。触发行为:hover or click */\n // trigger?: string | string[];\n /**气泡框位置,可选 top left right bottom */\n // placement?: Placement;\n};\nexport interface ITableThemeDefine {\n /** 表格绘制范围外的canvas上填充的颜色 */\n underlayBackgroundColor?: string;\n // selectionBgColor?: ColorPropertyDefine; //多选单元格背景色 手动设置的多选 非框选\n defaultStyle?: ThemeStyle;\n cornerHeaderStyle?: ThemeStyle; //角头样式\n cornerRightTopCellStyle?: ThemeStyle; // 右上角占位单元格样式\n cornerLeftBottomCellStyle?: ThemeStyle; // 左下角占位单元格样式\n cornerRightBottomCellStyle?: ThemeStyle; // 右下角占位单元格样式\n rightFrozenStyle?: ThemeStyle; // 右侧冻结单元格样式\n bottomFrozenStyle?: ThemeStyle; // 下部冻结单元格样式\n headerStyle?: ThemeStyle;\n rowHeaderStyle?: ThemeStyle;\n bodyStyle?: ThemeStyle;\n groupTitleStyle?: ThemeStyle;\n frameStyle?: TableFrameStyle;\n //列调整宽度的直线\n columnResize?: {\n visibleOnHover?: boolean; //是否在hover时显示\n lineColor?: ColorPropertyDefine; //上面线的颜色\n bgColor?: ColorPropertyDefine; //背景线的颜色\n lineWidth?: number; //上面线的宽度\n width?: number; //背景线的宽度\n resizeHotSpotSize?: number; //响应调整行高列宽交互行为热区的大小\n labelVisible?: boolean; //是否显示label\n labelColor?: string; //label的颜色\n labelFontSize?: number; //label的字体大小\n labelFontFamily?: string; //label的字体\n labelBackgroundFill?: string; //label的背景填充\n labelBackgroundCornerRadius?: number; //label的背景圆角\n };\n //拖拽表格换位分割线的样式\n dragHeaderSplitLine?: {\n lineColor: ColorPropertyDefine; //上面线的颜色\n lineWidth: number; //上面线的宽度\n shadowBlockColor?: string; //拖拽时阴影区域的颜色\n };\n //冻结列后面的效果\n frozenColumnLine?: {\n shadow?: {\n //默认效果 会有阴影配置\n width: number; //阴影整体宽度\n startColor: string; //开始颜色\n endColor: string; //结束颜色\n /**滚动条是否可见 'always' | 'scrolling' | 'none' | 'focus',常驻|滚动时|不显示|聚焦在画布上时 。默认'scrolling'*/\n visible?: 'always' | 'scrolling';\n };\n /** TODO 暂未生效 */\n border?: {\n //有些需求要两种效果 这里配置滚动前的边框效果(实现方式是两条线叠加产生),滚动后按上面的阴影效果\n lineColor: ColorPropertyDefine; //上面线的颜色\n bgColor?: ColorPropertyDefine; //背景线的颜色\n lineWidth: number; //上面线的宽度\n width?: number; //背景线的宽度\n };\n };\n\n // menuStyle?: menuStyle;\n scrollStyle?: ScrollStyle;\n tooltipStyle?: TooltipStyle;\n // selectHeaderHighlight?: boolean;\n /** 选择框样式 */\n selectionStyle?: //Omit<InteractionStyle, 'inlineRowBgColor' | 'inlineColumnBgColor'>; //鼠标点击到某个单元格\n {\n cellBorderColor?: string; //边框颜色\n cellBorderLineWidth?: number; //边框线宽度\n cellBgColor?: string; //选择框背景颜色\n inlineRowBgColor?: string; //交互所在整行的背景颜色\n inlineColumnBgColor?: string; //交互所在整列的背景颜色\n selectionFillMode?: 'overlay' | 'replace'; //选择框填充模式,overlay表示选择框背景色覆盖在表格上(需要配饰透明度),replace表示背景色替换原有单元格的背景色\n dynamicUpdateSelectionSize?: boolean; // 选择框大小随滚动动态变化,用于冻结并且背景透明的场景,默认false,开启后性能会有一定影响\n };\n\n // style for axis\n axisStyle?: {\n defaultAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'>;\n leftAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'> & {\n cellPaddingLeft?: number;\n };\n rightAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'> & {\n cellPaddingRight?: number;\n };\n topAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'> & {\n cellPaddingTop?: number;\n };\n bottomAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'> & {\n cellPaddingBottom?: number;\n };\n };\n\n checkboxStyle?: CheckboxStyle;\n radioStyle?: RadioStyle;\n switchStyle?: SwitchStyle;\n buttonStyle?: ButtonStyle;\n\n // style for text pop tip\n textPopTipStyle?: PopTipAttributes;\n\n // senior config for fs\n // 表格四侧单元格,靠近边缘的border是否需要再绘制;如配置false的话,当表格左侧frame未设置情况下左侧单元格不显示左边框,其他方向同理\n cellInnerBorder?: boolean;\n // cell border clip direction\n cellBorderClipDirection?: 'top-left' | 'bottom-right'; // default is 'top-left'\n // text offset, hack for fs\n _contentOffset?: number;\n /** 内部功能性按钮图标颜色及尺寸配置 */\n functionalIconsStyle?: {\n sort_color?: string;\n sort_color_opacity?: string;\n sort_color_2?: string;\n sort_color_opacity_2?: string;\n sort_size?: number;\n sort_size_2?: number;\n frozen_color?: string;\n frozen_color_opacity?: string;\n frozen_color_2?: string;\n frozen_color_opacity_2?: string;\n frozen_size?: number;\n frozen_size_2?: number;\n collapse_color?: string;\n collapse_color_opacity?: string;\n collapse_size?: number;\n collapse_size_2?: number;\n expand_color?: string;\n expand_color_opacity?: string;\n expand_size?: number;\n expand_size_2?: number;\n dragReorder_color?: string;\n dragReorder_color_opacity?: string;\n dragReorder_size?: number;\n };\n}\n\nexport type RequiredTableThemeDefine = Required<ITableThemeDefine>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/vrender.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qEAA0D;AAC1D,kCAAgC;AAChC,yDAAwH;AACxH,yDAqBgC;AAIhC,IAAI,QAAQ,GAAG,KAAK,CAAC;AACrB,SAAgB,kBAAkB;IAChC,IAAI,QAAQ,EAAE;QACZ,OAAO;KACR;IACD,QAAQ,GAAG,IAAI,CAAC;IAEhB,IAAA,+BAAgB,GAAE,CAAC;IAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;QAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;KAC3B;SAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;QACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;KACxB;IACD,IAAA,0BAAW,GAAE,CAAC;IAGd,IAAA,6BAAc,GAAE,CAAC;IAEjB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,2BAAY,GAAE,CAAC;IAIf,IAAA,2BAAY,GAAE,CAAC;IAEf,IAAA,+BAAgB,GAAE,CAAC;IACnB,IAAA,iCAAkB,GAAE,CAAC;IACrB,IAAA,6BAAc,GAAE,CAAC;IACjB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,uCAAwB,GAAE,CAAC;IAE3B,IAAA,+BAAU,GAAE,CAAC;IAEb,IAAA,uCAAwB,GAAE,CAAC;AAC7B,CAAC;AAnCD,gDAmCC;AAOD,yDAAuC;AACvC,yDAAuC;AACvC,+DAA6C;AAC7C,4DAA0C","file":"vrender.js","sourcesContent":["import { loadPoptip } from '@visactor/vrender-components';\nimport '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule, registerFlexLayoutPlugin } from '@visactor/vrender-core';\nimport {\n loadBrowserEnv,\n loadNodeEnv,\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\n// export const version = \"1.22.5-alpha.1\";\n\nlet registed = false;\nexport function registerForVrender() {\n if (registed) {\n return;\n }\n registed = true;\n // 注册内置组件\n preLoadAllModule();\n\n if (isBrowserEnv()) {\n loadBrowserEnv(container);\n } else if (isNodeEnv()) {\n loadNodeEnv(container);\n }\n registerArc();\n // registerArc3d();\n // registerArea();\n registerCircle();\n // registerGlyph();\n registerGroup();\n registerImage();\n registerLine();\n // registerPath();\n // registerPolygon();\n // registerPyramid3d();\n registerRect();\n // registerRect3d();\n registerRichtext();\n registerShadowRoot();\n registerSymbol();\n registerText();\n registerFlexLayoutPlugin();\n // registerWrapText();\n loadPoptip();\n\n registerFlexLayoutPlugin();\n}\n\nexport type { Direction } from '@visactor/vrender-core';\nexport type { State } from '@visactor/vrender-components';\n// export { GroupFadeIn } from '@visactor/vrender-core';\n// export { GroupFadeOut } from '@visactor/vrender-core';\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\nexport * from '@visactor/vrender-components';\nexport * from '@visactor/vrender-animate';\n"]}
1
+ {"version":3,"sources":["../src/vrender.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qEAA0D;AAC1D,kCAAgC;AAChC,yDAAwH;AACxH,yDAqBgC;AAIhC,IAAI,QAAQ,GAAG,KAAK,CAAC;AACrB,SAAgB,kBAAkB;IAChC,IAAI,QAAQ,EAAE;QACZ,OAAO;KACR;IACD,QAAQ,GAAG,IAAI,CAAC;IAEhB,IAAA,+BAAgB,GAAE,CAAC;IAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;QAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;KAC3B;SAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;QACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;KACxB;IACD,IAAA,0BAAW,GAAE,CAAC;IAGd,IAAA,6BAAc,GAAE,CAAC;IAEjB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,2BAAY,GAAE,CAAC;IAIf,IAAA,2BAAY,GAAE,CAAC;IAEf,IAAA,+BAAgB,GAAE,CAAC;IACnB,IAAA,iCAAkB,GAAE,CAAC;IACrB,IAAA,6BAAc,GAAE,CAAC;IACjB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,uCAAwB,GAAE,CAAC;IAE3B,IAAA,+BAAU,GAAE,CAAC;IAEb,IAAA,uCAAwB,GAAE,CAAC;AAC7B,CAAC;AAnCD,gDAmCC;AAOD,yDAAuC;AACvC,yDAAuC;AACvC,+DAA6C;AAC7C,4DAA0C","file":"vrender.js","sourcesContent":["import { loadPoptip } from '@visactor/vrender-components';\nimport '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule, registerFlexLayoutPlugin } from '@visactor/vrender-core';\nimport {\n loadBrowserEnv,\n loadNodeEnv,\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\n// export const version = \"1.22.5-alpha.2\";\n\nlet registed = false;\nexport function registerForVrender() {\n if (registed) {\n return;\n }\n registed = true;\n // 注册内置组件\n preLoadAllModule();\n\n if (isBrowserEnv()) {\n loadBrowserEnv(container);\n } else if (isNodeEnv()) {\n loadNodeEnv(container);\n }\n registerArc();\n // registerArc3d();\n // registerArea();\n registerCircle();\n // registerGlyph();\n registerGroup();\n registerImage();\n registerLine();\n // registerPath();\n // registerPolygon();\n // registerPyramid3d();\n registerRect();\n // registerRect3d();\n registerRichtext();\n registerShadowRoot();\n registerSymbol();\n registerText();\n registerFlexLayoutPlugin();\n // registerWrapText();\n loadPoptip();\n\n registerFlexLayoutPlugin();\n}\n\nexport type { Direction } from '@visactor/vrender-core';\nexport type { State } from '@visactor/vrender-components';\n// export { GroupFadeIn } from '@visactor/vrender-core';\n// export { GroupFadeOut } from '@visactor/vrender-core';\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\nexport * from '@visactor/vrender-components';\nexport * from '@visactor/vrender-animate';\n"]}
package/dist/vtable.js CHANGED
@@ -49030,6 +49030,10 @@
49030
49030
  else {
49031
49031
  if (hideTooltip) {
49032
49032
  chartInstanceListColumnByColumnDirection[col][i].hideTooltip();
49033
+ chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
49034
+ tooltip: false,
49035
+ showTooltipOption: { x: canvasXY.x, y: absolutePosition.top + 3, activeType: 'dimension' }
49036
+ });
49033
49037
  }
49034
49038
  else {
49035
49039
  chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
@@ -49122,6 +49126,10 @@
49122
49126
  else {
49123
49127
  if (hideTooltip) {
49124
49128
  chartInstanceListRowByRowDirection[row][i].hideTooltip();
49129
+ chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
49130
+ tooltip: false,
49131
+ showTooltipOption: { x: absolutePosition.left + 3, y: canvasXY.y, activeType: 'dimension' }
49132
+ });
49125
49133
  }
49126
49134
  else {
49127
49135
  chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
@@ -49388,6 +49396,11 @@
49388
49396
  row === layout.columnHeaderLevelCount - 1 &&
49389
49397
  col >= layout.rowHeaderLevelCount &&
49390
49398
  col < layout.colCount - layout.rightFrozenColCount) {
49399
+ const indicatorKey = layout.getIndicatorKey(col, row);
49400
+ const indicatorInfo = layout.getIndicatorInfo(indicatorKey);
49401
+ if (!indicatorInfo?.hasTwoIndicatorAxes) {
49402
+ return;
49403
+ }
49391
49404
  const axisRange = getRange('top', col, row + 1, col, layout.columnHeaderLevelCount - 1, col, row, 1, layout);
49392
49405
  if (!axisRange) {
49393
49406
  return;
@@ -49590,14 +49603,19 @@
49590
49603
  else if (col === layout.colCount - layout.rightFrozenColCount &&
49591
49604
  row >= layout.columnHeaderLevelCount &&
49592
49605
  row < layout.rowCount - layout.bottomFrozenRowCount) {
49606
+ const indicatorKey = layout.getIndicatorKey(col, row);
49607
+ const indicatorInfo = layout.getIndicatorInfo(indicatorKey);
49608
+ if (!indicatorInfo?.hasTwoIndicatorAxes) {
49609
+ return;
49610
+ }
49611
+ const { axisOption, chartType } = getAxisOption(col - 1, row, 'right', layout);
49593
49612
  const axisRange = getRange('right', col - 1, row, layout.rowHeaderLevelCount - 1, row, col, row, 1, layout);
49594
- const { chartType } = getAxisOption(col - 1, row, 'right', layout);
49595
49613
  if (!axisRange) {
49596
49614
  return;
49597
49615
  }
49598
49616
  const chartCellStyle = layout._table._getCellStyle(col - 1, row);
49599
49617
  const bodyChartCellPadding = getQuadProps(getProp('padding', chartCellStyle, col - 1, row, layout._table));
49600
- const { range, ticks, axisOption, index, targetTicks, targetRange, theme } = axisRange;
49618
+ const { range, ticks, index, targetTicks, targetRange, theme } = axisRange;
49601
49619
  if (isNumber$4(axisOption?.min)) {
49602
49620
  range.min = axisOption.min;
49603
49621
  if (range.min > 0) {
@@ -49715,7 +49733,7 @@
49715
49733
  const axisOption = layout._table.pivotChartAxes.find(axisOption => {
49716
49734
  return axisOption.orient === orient;
49717
49735
  }) ?? {};
49718
- if (!axisOption.labelHoverOnAxis) {
49736
+ if (axisOption && !axisOption.labelHoverOnAxis) {
49719
49737
  axisOption.labelHoverOnAxis = layout._table.options.chartDimensionLinkage?.labelHoverOnAxis?.[orient];
49720
49738
  }
49721
49739
  const { isZeroAlign, isTickAlign } = checkZeroAlign(spec, orient, layout);
@@ -49784,7 +49802,7 @@
49784
49802
  }
49785
49803
  return null;
49786
49804
  }
49787
- let defaultKey = indicatorKeys?.[seriesId];
49805
+ let defaultKey = indicatorKeys?.[seriesId] ?? indicatorKeys?.[0];
49788
49806
  if (isArray$7(defaultKey)) {
49789
49807
  defaultKey = defaultKey[0];
49790
49808
  }
@@ -50091,6 +50109,9 @@
50091
50109
  chartInstance;
50092
50110
  activeChartInstance;
50093
50111
  activeChartInstanceHoverOnMark = null;
50112
+ justShowMarkTooltip = undefined;
50113
+ justShowMarkTooltipTimer = Date.now();
50114
+ delayRunDimensionHoverTimer = undefined;
50094
50115
  cacheCanvas;
50095
50116
  isShareChartSpec;
50096
50117
  constructor(isShareChartSpec, params) {
@@ -50233,41 +50254,114 @@
50233
50254
  }
50234
50255
  }
50235
50256
  else {
50236
- let hideTooltip = false;
50257
+ let justShowMarkTooltip = true;
50237
50258
  const preMark = this.activeChartInstanceHoverOnMark;
50259
+ const prev_justShowMarkTooltip = this.justShowMarkTooltip;
50238
50260
  if (params.mark && params.datum && !Array.isArray(params.datum)) {
50239
50261
  this.activeChartInstanceHoverOnMark = params.mark;
50240
- hideTooltip = true;
50262
+ justShowMarkTooltip = true;
50241
50263
  }
50242
50264
  else {
50243
50265
  this.activeChartInstanceHoverOnMark = null;
50266
+ justShowMarkTooltip = false;
50267
+ }
50268
+ this.justShowMarkTooltip = justShowMarkTooltip;
50269
+ let delayRunDimensionHover = false;
50270
+ if (prev_justShowMarkTooltip === true && justShowMarkTooltip === false) {
50271
+ this.justShowMarkTooltipTimer = Date.now();
50272
+ delayRunDimensionHover = true;
50273
+ }
50274
+ else if (prev_justShowMarkTooltip === false && justShowMarkTooltip === false) {
50275
+ if (Date.now() - this.justShowMarkTooltipTimer < 100) {
50276
+ delayRunDimensionHover = true;
50277
+ }
50278
+ else {
50279
+ delayRunDimensionHover = false;
50280
+ }
50281
+ }
50282
+ else if (prev_justShowMarkTooltip === false && justShowMarkTooltip === true) {
50283
+ delayRunDimensionHover = false;
50284
+ clearTimeout(this.delayRunDimensionHoverTimer);
50285
+ this.delayRunDimensionHoverTimer = undefined;
50286
+ }
50287
+ else if (prev_justShowMarkTooltip === true && justShowMarkTooltip === true) {
50288
+ delayRunDimensionHover = false;
50289
+ clearTimeout(this.delayRunDimensionHoverTimer);
50290
+ this.delayRunDimensionHoverTimer = undefined;
50244
50291
  }
50245
50292
  if (params.action === 'enter' || preMark !== this.activeChartInstanceHoverOnMark) {
50246
50293
  const dimensionValue = dimensionInfo.value;
50247
50294
  const indicatorsAsCol = table.options.indicatorsAsCol;
50295
+ if (!delayRunDimensionHover) {
50296
+ if (indicatorsAsCol) {
50297
+ generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, false);
50298
+ }
50299
+ else {
50300
+ generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, justShowMarkTooltip, false);
50301
+ }
50302
+ }
50303
+ else {
50304
+ clearTimeout(this.delayRunDimensionHoverTimer);
50305
+ this.delayRunDimensionHoverTimer = setTimeout(() => {
50306
+ if (indicatorsAsCol) {
50307
+ generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, false);
50308
+ }
50309
+ else {
50310
+ generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, justShowMarkTooltip, false);
50311
+ }
50312
+ }, 100);
50313
+ }
50248
50314
  if (indicatorsAsCol) {
50249
50315
  const series = dimensionInfo.data[0].series;
50250
- const width = series.getYAxisHelper().getBandwidth(0);
50251
- const y = series.valueToPositionY(dimensionValue);
50316
+ const width = this.attribute.spec.type === 'histogram' ||
50317
+ this.attribute.spec.type === 'boxPlot' ||
50318
+ series.type === 'line' ||
50319
+ series.type === 'area'
50320
+ ? 0
50321
+ : series.getYAxisHelper().getBandwidth(0);
50322
+ let y = series.valueToPositionY(dimensionValue);
50252
50323
  const axisConfig = getAxisConfigInPivotChart(table.rowHeaderLevelCount - 1, row, table.internalProps.layoutMap);
50324
+ let hoverOnLabelValue = yValue;
50325
+ if (this.attribute.spec.type === 'histogram') {
50326
+ const { series, datum } = dimensionInfo.data[0];
50327
+ if (datum.length > 0) {
50328
+ const rangeStartValue = datum[0][series.fieldY[0]];
50329
+ const rangeEndValue = datum[0][series.fieldY2];
50330
+ hoverOnLabelValue = rangeStartValue + ' ~ ' + rangeEndValue;
50331
+ y = (series.valueToPositionY(rangeStartValue) + series.valueToPositionY(rangeEndValue)) / 2;
50332
+ }
50333
+ }
50253
50334
  if (axisConfig.labelHoverOnAxis) {
50254
50335
  table.scenegraph
50255
50336
  .getCell(table.rowHeaderLevelCount - 1, row)
50256
- .firstChild.showLabelHoverOnAxis(y + (series.type === 'line' || series.type === 'area' ? 0 : width / 2), yValue);
50337
+ .firstChild.showLabelHoverOnAxis(y + (series.type === 'line' || series.type === 'area' ? 0 : width / 2), hoverOnLabelValue);
50257
50338
  }
50258
- generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, hideTooltip, false);
50259
50339
  }
50260
50340
  else {
50261
50341
  const series = dimensionInfo.data[0].series;
50262
- const width = series.getXAxisHelper().getBandwidth(0);
50263
- const x = series.valueToPositionX(dimensionValue);
50342
+ const width = this.attribute.spec.type === 'histogram' ||
50343
+ this.attribute.spec.type === 'boxPlot' ||
50344
+ series.type === 'line' ||
50345
+ series.type === 'area'
50346
+ ? 0
50347
+ : series.getXAxisHelper().getBandwidth(0);
50348
+ let x = series.valueToPositionX(dimensionValue);
50264
50349
  const axisConfig = getAxisConfigInPivotChart(col, table.rowCount - table.bottomFrozenRowCount, table.internalProps.layoutMap);
50350
+ let hoverOnLabelValue = dimensionValue;
50351
+ if (this.attribute.spec.type === 'histogram') {
50352
+ const { series, datum } = dimensionInfo.data[0];
50353
+ if (datum.length > 0) {
50354
+ const rangeStartValue = datum[0][series.fieldX[0]];
50355
+ const rangeEndValue = datum[0][series.fieldX2];
50356
+ hoverOnLabelValue = rangeStartValue + ' ~ ' + rangeEndValue;
50357
+ x = (series.valueToPositionX(rangeStartValue) + series.valueToPositionX(rangeEndValue)) / 2;
50358
+ }
50359
+ }
50265
50360
  if (axisConfig.labelHoverOnAxis) {
50266
50361
  table.scenegraph
50267
50362
  .getCell(col, table.rowCount - table.bottomFrozenRowCount)
50268
- .firstChild.showLabelHoverOnAxis(x + (series.type === 'line' || series.type === 'area' ? 0 : width / 2), dimensionValue);
50363
+ .firstChild.showLabelHoverOnAxis(x + width / 2, hoverOnLabelValue);
50269
50364
  }
50270
- generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, hideTooltip, false);
50271
50365
  }
50272
50366
  }
50273
50367
  }
@@ -50279,6 +50373,10 @@
50279
50373
  static temp = 1;
50280
50374
  deactivate(table, { releaseChartInstance = true, releaseColumnChartInstance = true, releaseRowChartInstance = true } = {}) {
50281
50375
  this.activeChartInstanceHoverOnMark = null;
50376
+ this.justShowMarkTooltip = undefined;
50377
+ this.justShowMarkTooltipTimer = Date.now();
50378
+ clearTimeout(this.delayRunDimensionHoverTimer);
50379
+ this.delayRunDimensionHoverTimer = undefined;
50282
50380
  if (releaseChartInstance) {
50283
50381
  this.activeChartInstance?.updateViewBox({
50284
50382
  x1: -1000,
@@ -56732,7 +56830,8 @@
56732
56830
  const table = scenegraph.table;
56733
56831
  if (table.isPivotChart()) {
56734
56832
  const preSelectItemsCount = table._selectedDataItemsInChart.length;
56735
- if ((datum === null || datum?.length === 0 || Object.keys(datum).length === 0) && preSelectItemsCount === 0) {
56833
+ if ((datum === null || datum === undefined || datum?.length === 0 || Object.keys(datum).length === 0) &&
56834
+ preSelectItemsCount === 0) {
56736
56835
  return;
56737
56836
  }
56738
56837
  const newSelectedDataItemsInChart = [];
@@ -69858,7 +69957,7 @@
69858
69957
  return TABLE_EVENT_TYPE;
69859
69958
  }
69860
69959
  options;
69861
- version = "1.22.5-alpha.1";
69960
+ version = "1.22.5-alpha.2";
69862
69961
  pagination;
69863
69962
  id = `VTable${Date.now()}`;
69864
69963
  headerStyleCache;
@@ -74743,6 +74842,15 @@
74743
74842
  const rowPath = layout.getRowKeysPath(col, row);
74744
74843
  const domain = data[rowPath ?? ''];
74745
74844
  const { axisOption, isPercent, chartType } = getAxisOption(col, row, 'left', layout);
74845
+ if (axisOption?.zero &&
74846
+ domain &&
74847
+ !Array.isArray(domain) &&
74848
+ isValid$3(domain.min) &&
74849
+ isValid$3(domain.max) &&
74850
+ (axisOption?.zero || domain.min === domain.max)) {
74851
+ domain.min = Math.min(domain.min, 0);
74852
+ domain.max = Math.max(domain.max, 0);
74853
+ }
74746
74854
  axes.push(merge$1({
74747
74855
  domain: axisOption?.type === 'linear' && !Array.isArray(domain) ? undefined : Array.from(domain ?? []),
74748
74856
  range: axisOption?.type === 'linear' && !Array.isArray(domain) ? domain : undefined,
@@ -74813,6 +74921,15 @@
74813
74921
  const colPath = layout.getColKeysPath(col, row);
74814
74922
  const domain = data?.[colPath ?? ''] ?? [];
74815
74923
  const { axisOption, isPercent, chartType } = getAxisOption(col, row, 'bottom', layout);
74924
+ if (axisOption?.zero &&
74925
+ domain &&
74926
+ !Array.isArray(domain) &&
74927
+ isValid$3(domain.min) &&
74928
+ isValid$3(domain.max) &&
74929
+ (axisOption?.zero || domain.min === domain.max)) {
74930
+ domain.min = Math.min(domain.min, 0);
74931
+ domain.max = Math.max(domain.max, 0);
74932
+ }
74816
74933
  axes.push(merge$1({
74817
74934
  domain: axisOption?.type === 'linear' && !Array.isArray(domain) ? undefined : Array.from(domain ?? []),
74818
74935
  range: axisOption?.type === 'linear' && !Array.isArray(domain) ? domain : undefined,
@@ -85720,7 +85837,8 @@
85720
85837
  this.fullRowDimensionKeys = this.fullRowDimensionKeys.concat(this.rowDimensionKeys);
85721
85838
  this.resetRowHeaderLevelCount();
85722
85839
  if (this._table.isPivotChart()) {
85723
- this.hasTwoIndicatorAxes = this.indicatorsDefine.some((indicatorObject) => {
85840
+ this.hasTwoIndicatorAxes = false;
85841
+ this.indicatorsDefine.forEach((indicatorObject) => {
85724
85842
  if (indicatorObject.chartSpec &&
85725
85843
  indicatorObject.chartSpec.series &&
85726
85844
  indicatorObject.chartSpec.series.length > 1) {
@@ -85732,9 +85850,58 @@
85732
85850
  }
85733
85851
  return true;
85734
85852
  })) {
85853
+ indicatorObject.hasTwoIndicatorAxes = true;
85854
+ this.hasTwoIndicatorAxes = true;
85735
85855
  return true;
85736
85856
  }
85737
85857
  }
85858
+ indicatorObject.hasTwoIndicatorAxes = false;
85859
+ return false;
85860
+ });
85861
+ this.indicatorsDefine.forEach((indicatorObject) => {
85862
+ if (indicatorObject.hasTwoIndicatorAxes) {
85863
+ return false;
85864
+ }
85865
+ if (indicatorObject.chartSpec) {
85866
+ const axes = indicatorObject.chartSpec.axes ?? this._table.pivotChartAxes ?? [];
85867
+ if (this.indicatorsAsCol) {
85868
+ const topAxis = axes.find((axis) => {
85869
+ if (axis.orient === 'top' && axis.visible !== false) {
85870
+ return true;
85871
+ }
85872
+ return false;
85873
+ });
85874
+ const bottomAxis = axes.find((axis) => {
85875
+ if (axis.orient === 'bottom' && axis.visible !== false) {
85876
+ return true;
85877
+ }
85878
+ return false;
85879
+ });
85880
+ if (topAxis && bottomAxis) {
85881
+ indicatorObject.hasTwoIndicatorAxes = true;
85882
+ return true;
85883
+ }
85884
+ }
85885
+ else {
85886
+ const leftAxis = axes.find((axis) => {
85887
+ if (axis.orient === 'left' && axis.visible !== false) {
85888
+ return true;
85889
+ }
85890
+ return false;
85891
+ });
85892
+ const rightAxis = axes.find((axis) => {
85893
+ if (axis.orient === 'right' && axis.visible !== false) {
85894
+ return true;
85895
+ }
85896
+ return false;
85897
+ });
85898
+ if (leftAxis && rightAxis) {
85899
+ indicatorObject.hasTwoIndicatorAxes = true;
85900
+ return true;
85901
+ }
85902
+ }
85903
+ }
85904
+ indicatorObject.hasTwoIndicatorAxes = false;
85738
85905
  return false;
85739
85906
  });
85740
85907
  }
@@ -88446,7 +88613,9 @@
88446
88613
  ? chartSpec.type === 'histogram'
88447
88614
  ? chartSpec.x2Field
88448
88615
  : chartSpec.xField ?? chartSpec?.series?.[0]?.xField
88449
- : chartSpec.yField ?? chartSpec?.series?.[0]?.yField;
88616
+ : chartSpec.type === 'histogram'
88617
+ ? chartSpec.y2Field
88618
+ : chartSpec.yField ?? chartSpec?.series?.[0]?.yField;
88450
88619
  if (dimensionKey) {
88451
88620
  return dimensionKey;
88452
88621
  }
@@ -93444,7 +93613,9 @@
93444
93613
  collectValuesBy[indicatorDefine.indicatorKey] = {
93445
93614
  by: columnKeys,
93446
93615
  range: true,
93447
- sumBy: indicatorSpec?.stack && rowKeys.concat(indicatorSpec?.yField)
93616
+ sumBy: indicatorSpec.type === 'histogram'
93617
+ ? rowKeys.concat(indicatorSpec?.yField, indicatorSpec?.y2Field)
93618
+ : indicatorSpec?.stack && rowKeys.concat(indicatorSpec?.yField)
93448
93619
  };
93449
93620
  }
93450
93621
  if (indicatorSpec.series) {
@@ -93474,7 +93645,11 @@
93474
93645
  });
93475
93646
  }
93476
93647
  else {
93477
- const yField = typeof indicatorSpec.yField === 'string' ? indicatorSpec.yField : indicatorSpec.yField[0];
93648
+ const yField = indicatorSpec.type === 'histogram'
93649
+ ? indicatorSpec.y2Field
93650
+ : typeof indicatorSpec.yField === 'string'
93651
+ ? indicatorSpec.yField
93652
+ : indicatorSpec.yField[0];
93478
93653
  collectValuesBy[yField] = {
93479
93654
  by: rowKeys,
93480
93655
  type: indicatorSpec.direction === 'horizontal' ? 'yField' : undefined,
@@ -93484,14 +93659,14 @@
93484
93659
  indicatorSpec?.stack !== false &&
93485
93660
  (indicatorSpec?.type === 'bar' || indicatorSpec?.type === 'area') &&
93486
93661
  (indicatorSpec.stack = true);
93487
- const xField = indicatorSpec.type === 'histogram'
93488
- ? indicatorSpec.x2Field
93489
- : indicatorSpec.xField ?? indicatorSpec.maxField;
93662
+ const xField = indicatorSpec.xField ?? indicatorSpec.maxField;
93490
93663
  collectValuesBy[xField] = {
93491
93664
  by: columnKeys,
93492
93665
  type: indicatorSpec.direction === 'horizontal' ? 'xField' : undefined,
93493
93666
  range: hasLinearAxis(indicatorSpec, this._axes, indicatorSpec.direction === 'horizontal', true),
93494
- sumBy: indicatorSpec.stack && rowKeys.concat(indicatorSpec?.yField),
93667
+ sumBy: indicatorSpec.type === 'histogram'
93668
+ ? rowKeys.concat(indicatorSpec?.yField, indicatorSpec?.y2Field)
93669
+ : indicatorSpec.stack && rowKeys.concat(indicatorSpec?.yField),
93495
93670
  sortBy: indicatorSpec.direction !== 'horizontal' ? indicatorSpec?.data?.fields?.[xField]?.domain : undefined,
93496
93671
  extendRange: parseMarkLineGetExtendRange(indicatorSpec.markLine),
93497
93672
  considerFields: indicatorSpec?.type === 'boxPlot'
@@ -94503,7 +94678,7 @@
94503
94678
  }
94504
94679
 
94505
94680
  registerForVrender();
94506
- const version = "1.22.5-alpha.1";
94681
+ const version = "1.22.5-alpha.2";
94507
94682
  function getIcons() {
94508
94683
  return get$2();
94509
94684
  }