@visactor/vtable 1.6.0 → 1.6.2-alpha.1

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 (55) hide show
  1. package/cjs/body-helper/style/Style.d.ts +2 -2
  2. package/cjs/body-helper/style/Style.js.map +1 -1
  3. package/cjs/components/axis/axis.d.ts +1 -0
  4. package/cjs/components/axis/axis.js +14 -10
  5. package/cjs/components/axis/axis.js.map +1 -1
  6. package/cjs/core/BaseTable.js +3 -3
  7. package/cjs/core/BaseTable.js.map +1 -1
  8. package/cjs/header-helper/style/Style.d.ts +2 -2
  9. package/cjs/header-helper/style/Style.js.map +1 -1
  10. package/cjs/index.d.ts +1 -1
  11. package/cjs/index.js +1 -1
  12. package/cjs/index.js.map +1 -1
  13. package/cjs/layout/chart-helper/get-axis-config.js +26 -13
  14. package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
  15. package/cjs/scenegraph/component/menu.d.ts +41 -0
  16. package/cjs/scenegraph/group-creater/cell-helper.js +3 -3
  17. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  18. package/cjs/scenegraph/layout/update-width.js +4 -4
  19. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  20. package/cjs/scenegraph/refresh-node/update-chart.js +2 -1
  21. package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
  22. package/cjs/scenegraph/utils/text-measure.d.ts +33 -0
  23. package/cjs/themes/theme.js.map +1 -1
  24. package/cjs/vrender.d.ts +1 -1
  25. package/cjs/vrender.js +6 -14
  26. package/cjs/vrender.js.map +1 -1
  27. package/dist/vtable.js +10387 -13202
  28. package/dist/vtable.min.js +2 -2
  29. package/es/body-helper/style/Style.d.ts +2 -2
  30. package/es/body-helper/style/Style.js.map +1 -1
  31. package/es/components/axis/axis.d.ts +1 -0
  32. package/es/components/axis/axis.js +14 -10
  33. package/es/components/axis/axis.js.map +1 -1
  34. package/es/core/BaseTable.js +3 -3
  35. package/es/core/BaseTable.js.map +1 -1
  36. package/es/header-helper/style/Style.d.ts +2 -2
  37. package/es/header-helper/style/Style.js.map +1 -1
  38. package/es/index.d.ts +1 -1
  39. package/es/index.js +1 -1
  40. package/es/index.js.map +1 -1
  41. package/es/layout/chart-helper/get-axis-config.js +23 -12
  42. package/es/layout/chart-helper/get-axis-config.js.map +1 -1
  43. package/es/scenegraph/component/menu.d.ts +41 -0
  44. package/es/scenegraph/group-creater/cell-helper.js +3 -3
  45. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  46. package/es/scenegraph/layout/update-width.js +4 -4
  47. package/es/scenegraph/layout/update-width.js.map +1 -1
  48. package/es/scenegraph/refresh-node/update-chart.js +2 -1
  49. package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
  50. package/es/scenegraph/utils/text-measure.d.ts +33 -0
  51. package/es/themes/theme.js.map +1 -1
  52. package/es/vrender.d.ts +1 -1
  53. package/es/vrender.js +2 -4
  54. package/es/vrender.js.map +1 -1
  55. package/package.json +15 -14
@@ -57,8 +57,8 @@ export declare class Style extends EventTarget implements ColumnStyle {
57
57
  set bgColor(bgColor: ColorPropertyDefine | undefined);
58
58
  get borderColor(): ColorsPropertyDefine | undefined;
59
59
  set borderColor(borderColor: ColorsPropertyDefine | undefined);
60
- get textStick(): boolean;
61
- set textStick(textStick: boolean);
60
+ get textStick(): boolean | 'vertical' | 'horizontal';
61
+ set textStick(textStick: boolean | 'vertical' | 'horizontal');
62
62
  get textStickBaseOnAlign(): boolean;
63
63
  set textStickBaseOnAlign(textStickBaseOnAlign: boolean);
64
64
  get textAlign(): TextAlignType | undefined;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/body-helper/style/Style.ts"],"names":[],"mappings":";;;AAuBA,IAAI,YAAmB,CAAC;AACxB,yDAAsD;AACtD,MAAM,gBAAgB,GAAG;IACvB,YAAY,EAAE,cAAuB;CACtC,CAAC;AAEF,MAAa,KAAM,SAAQ,yBAAW;IA8BpC,MAAM,KAAK,UAAU;QACnB,O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B,CAAC;IACD,IAAI,eAAe,CAAC,eAAmD;QACrE,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;IAE1C,CAAC;IACD,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IACD,IAAI,SAAS,CAAC,SAA0C;QACtD,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAE9B,CAAC;IACD,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IACD,IAAI,MAAM,CAAC,MAAwC;QACjD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAExB,CAAC;IACD,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IACD,IAAI,eAAe,CAAC,eAAqD;QACvE,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;IAE1C,CAAC;IACD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IACD,IAAI,cAAc,CAAC,cAAmD;QACpE,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;IAExC,CAAC;IACD,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IACD,IAAI,MAAM,CAAC,MAAwC;QACjD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAExB,CAAC;IAID,KAAK;QACH,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF;AA9QD,sBA8QC","file":"Style.js","sourcesContent":["/* eslint-disable no-undef */\nimport type {\n ColorPropertyDefine,\n ColumnStyle,\n IStyleOption,\n TextOverflow,\n UnderlinePropertyDefine,\n LineThroughPropertyDefine,\n LineDashPropertyDefine,\n ColorsPropertyDefine,\n PaddingsPropertyDefine,\n CursorPropertyDefine,\n LineWidthsPropertyDefine,\n LineDashsPropertyDefine,\n MarkedPropertyDefine,\n FontSizePropertyDefine,\n FontFamilyPropertyDefine,\n FontWeightPropertyDefine,\n FontVariantPropertyDefine,\n FontStylePropertyDefine,\n TextAlignType,\n TextBaselineType\n} from '../../ts-types';\nlet defaultStyle: Style;\nimport { EventTarget } from '../../event/EventTarget';\nconst STYLE_EVENT_TYPE = {\n CHANGE_STYLE: 'change_style' as const\n};\n\nexport class Style extends EventTarget implements ColumnStyle {\n private _color?: ColorPropertyDefine;\n private _strokeColor?: ColorPropertyDefine;\n private _fontSize?: FontSizePropertyDefine;\n private _fontFamily?: FontFamilyPropertyDefine;\n private _fontWeight?: FontWeightPropertyDefine;\n private _fontVariant?: FontVariantPropertyDefine;\n private _fontStyle?: FontStylePropertyDefine;\n private _padding?: PaddingsPropertyDefine;\n private _defaultPadding: PaddingsPropertyDefine = [10, 16, 10, 16];\n private _textStick: boolean;\n private _textStickBaseOnAlign: boolean;\n private _textOverflow?: TextOverflow;\n private _textAlign?: TextAlignType;\n private _textBaseline?: TextBaselineType;\n private _bgColor?: ColorPropertyDefine;\n private _borderColor?: ColorsPropertyDefine;\n private _lineHeight?: number;\n private _underline?: UnderlinePropertyDefine;\n private _underlineColor?: ColorPropertyDefine;\n private _underlineDash?: LineDashPropertyDefine;\n private _underlineOffset?: number;\n private _lineThrough?: LineThroughPropertyDefine;\n private _lineThroughColor?: ColorPropertyDefine;\n private _lineThroughDash?: LineDashPropertyDefine;\n private _linkColor?: ColorPropertyDefine;\n private _cursor?: CursorPropertyDefine;\n private _borderLineWidth?: LineWidthsPropertyDefine;\n private _borderLineDash?: LineDashsPropertyDefine;\n private _marked?: MarkedPropertyDefine;\n static get EVENT_TYPE(): { CHANGE_STYLE: 'change_style' } {\n return STYLE_EVENT_TYPE;\n }\n static get DEFAULT(): Style {\n return defaultStyle ? defaultStyle : (defaultStyle = new Style());\n }\n constructor(style: IStyleOption = {}, bodyStyle: IStyleOption = {}) {\n super();\n this._textAlign = style?.textAlign ?? bodyStyle?.textAlign; //|| \"left\";\n this._textBaseline = style?.textBaseline ?? bodyStyle?.textBaseline; //|| \"middle\";\n this._color = style?.color ?? bodyStyle?.color;\n this._strokeColor = style?.strokeColor ?? bodyStyle?.strokeColor;\n // icon为文字前后可添加的图表\n this._fontSize = style.fontSize ?? bodyStyle?.fontSize;\n this._fontFamily = style.fontFamily ?? bodyStyle?.fontFamily;\n this._fontWeight = style.fontWeight ?? bodyStyle?.fontWeight;\n this._fontVariant = style.fontVariant ?? bodyStyle?.fontVariant;\n this._fontStyle = style.fontStyle ?? bodyStyle?.fontStyle;\n //修改不能设置为0的情况\n this._padding = style?.padding ?? bodyStyle?.padding ?? this._defaultPadding;\n this._borderColor = style?.borderColor ?? bodyStyle?.borderColor;\n this._textOverflow = style?.textOverflow ?? bodyStyle?.textOverflow; //|| \"clip\";\n this._textStick = style.textStick ?? bodyStyle?.textStick ?? false;\n this._textStickBaseOnAlign = style.textStickBaseOnAlign ?? bodyStyle?.textStickBaseOnAlign ?? false;\n this._bgColor = style?.bgColor ?? bodyStyle?.bgColor;\n this._lineHeight = style?.lineHeight ?? bodyStyle?.lineHeight;\n this._underline = style?.underline ?? bodyStyle?.underline;\n this._underlineColor = style?.underlineColor ?? bodyStyle?.underlineColor;\n this._underlineDash = style?.underlineDash ?? bodyStyle?.underlineDash;\n this._underlineOffset = style?.underlineOffset ?? bodyStyle?.underlineOffset;\n this._lineThrough = style?.lineThrough ?? bodyStyle?.lineThrough;\n this._lineThroughColor = style?.lineThroughColor ?? bodyStyle?.lineThroughColor;\n this._lineThroughDash = style?.lineThroughDash ?? bodyStyle?.lineThroughDash;\n this._linkColor = style?.linkColor ?? bodyStyle?.linkColor;\n this._cursor = style.cursor ?? bodyStyle?.cursor;\n this._borderLineWidth = style.borderLineWidth ?? bodyStyle?.borderLineWidth;\n this._borderLineDash = style.borderLineDash ?? bodyStyle?.borderLineDash;\n this._marked = style.marked ?? bodyStyle?.marked;\n }\n get color(): ColorPropertyDefine | undefined {\n return this._color;\n }\n set color(color: ColorPropertyDefine | undefined) {\n this._color = color;\n // this.doChangeStyle();\n }\n get strokeColor(): ColorPropertyDefine | undefined {\n return this._strokeColor;\n }\n set strokeColor(strokeColor: ColorPropertyDefine | undefined) {\n this._strokeColor = strokeColor;\n // this.doChangeStyle();\n }\n get fontSize(): FontSizePropertyDefine | undefined {\n return this._fontSize;\n }\n set fontSize(fontSize: FontSizePropertyDefine | undefined) {\n this._fontSize = fontSize;\n // this.doChangeStyle();\n }\n get fontFamily(): FontFamilyPropertyDefine | undefined {\n return this._fontFamily;\n }\n set fontFamily(fontFamily: FontFamilyPropertyDefine | undefined) {\n this._fontFamily = fontFamily;\n // this.doChangeStyle();\n }\n get fontWeight(): FontWeightPropertyDefine | undefined {\n return this._fontWeight;\n }\n set fontWeight(fontWeight: FontWeightPropertyDefine | undefined) {\n this._fontWeight = fontWeight;\n // this.doChangeStyle();\n }\n get fontVariant(): FontVariantPropertyDefine | undefined {\n return this._fontVariant;\n }\n set fontVariant(fontVariant: FontVariantPropertyDefine | undefined) {\n this._fontVariant = fontVariant;\n // this.doChangeStyle();\n }\n get fontStyle(): FontStylePropertyDefine | undefined {\n return this._fontStyle;\n }\n set fontStyle(fontStyle: FontStylePropertyDefine | undefined) {\n this._fontStyle = fontStyle;\n // this.doChangeStyle();\n }\n get padding(): PaddingsPropertyDefine | undefined {\n return this._padding;\n }\n set padding(padding: PaddingsPropertyDefine | undefined) {\n this._padding = padding;\n // this.doChangeStyle();\n }\n get textOverflow(): TextOverflow | undefined {\n return this._textOverflow;\n }\n set textOverflow(textOverflow: TextOverflow | undefined) {\n this._textOverflow = textOverflow;\n // this.doChangeStyle();\n }\n get bgColor(): ColorPropertyDefine | undefined {\n return this._bgColor;\n }\n set bgColor(bgColor: ColorPropertyDefine | undefined) {\n this._bgColor = bgColor;\n // this.doChangeStyle();\n }\n get borderColor(): ColorsPropertyDefine | undefined {\n return this._borderColor;\n }\n set borderColor(borderColor: ColorsPropertyDefine | undefined) {\n this._borderColor = borderColor;\n // this.doChangeStyle();\n }\n get textStick(): boolean {\n return this._textStick;\n }\n set textStick(textStick: boolean) {\n this._textStick = textStick;\n // this.doChangeStyle();\n }\n get textStickBaseOnAlign(): boolean {\n return this._textStickBaseOnAlign;\n }\n set textStickBaseOnAlign(textStickBaseOnAlign: boolean) {\n this._textStickBaseOnAlign = textStickBaseOnAlign;\n // this.doChangeStyle();\n }\n get textAlign(): TextAlignType | undefined {\n return this._textAlign;\n }\n set textAlign(textAlign: TextAlignType | undefined) {\n this._textAlign = textAlign;\n // this.doChangeStyle();\n }\n get textBaseline(): TextBaselineType | undefined {\n return this._textBaseline;\n }\n set textBaseline(textBaseline: TextBaselineType | undefined) {\n this._textBaseline = textBaseline;\n // this.doChangeStyle();\n }\n get lineHeight(): number | undefined {\n return this._lineHeight;\n }\n set lineHeight(lineHeight: number | undefined) {\n this._lineHeight = lineHeight;\n // this.doChangeStyle();\n }\n get underline(): UnderlinePropertyDefine | undefined {\n return this._underline;\n }\n set underline(underline: UnderlinePropertyDefine | undefined) {\n this._underline = underline;\n // this.doChangeStyle();\n }\n get underlineColor(): ColorPropertyDefine | undefined {\n return this._underlineColor;\n }\n set underlineColor(underlineColor: ColorPropertyDefine | undefined) {\n this._underlineColor = underlineColor;\n // this.doChangeStyle();\n }\n get underlineDash(): LineDashPropertyDefine | undefined {\n return this._underlineDash;\n }\n set underlineDash(underlineDash: LineDashPropertyDefine | undefined) {\n this._underlineDash = underlineDash;\n // this.doChangeStyle();\n }\n get underlineOffset(): number | undefined {\n return this._underlineOffset;\n }\n set underlineOffset(underlineOffset: number | undefined) {\n this._underlineOffset = underlineOffset;\n }\n get lineThrough(): LineThroughPropertyDefine | undefined {\n return this._lineThrough;\n }\n set lineThrough(lineThrough: LineThroughPropertyDefine | undefined) {\n this._lineThrough = lineThrough;\n // this.doChangeStyle();\n }\n get lineThroughColor(): ColorPropertyDefine | undefined {\n return this._lineThroughColor;\n }\n set lineThroughColor(lineThroughColor: ColorPropertyDefine | undefined) {\n this._lineThroughColor = lineThroughColor;\n // this.doChangeStyle();\n }\n get lineThroughDash(): LineDashPropertyDefine | undefined {\n return this._lineThroughDash;\n }\n set lineThroughDash(lineThroughDash: LineDashPropertyDefine | undefined) {\n this._lineThroughDash = lineThroughDash;\n // this.doChangeStyle();\n }\n get linkColor(): ColorPropertyDefine | undefined {\n return this._linkColor;\n }\n set linkColor(linkColor: ColorPropertyDefine | undefined) {\n this._linkColor = linkColor;\n // this.doChangeStyle();\n }\n get cursor(): CursorPropertyDefine | undefined {\n return this._cursor;\n }\n set cursor(cursor: CursorPropertyDefine | undefined) {\n this._cursor = cursor;\n // this.doChangeStyle();\n }\n get borderLineWidth(): LineWidthsPropertyDefine | undefined {\n return this._borderLineWidth;\n }\n set borderLineWidth(borderLineWidth: LineWidthsPropertyDefine | undefined) {\n this._borderLineWidth = borderLineWidth;\n // this.doChangeStyle();\n }\n get borderLineDash(): LineDashsPropertyDefine | undefined {\n return this._borderLineDash;\n }\n set borderLineDash(borderLineDash: LineDashsPropertyDefine | undefined) {\n this._borderLineDash = borderLineDash;\n // this.doChangeStyle();\n }\n get marked(): MarkedPropertyDefine | undefined {\n return this._marked;\n }\n set marked(marked: MarkedPropertyDefine | undefined) {\n this._marked = marked;\n // this.doChangeStyle();\n }\n // doChangeStyle(): void {\n // this.fireListeners(STYLE_EVENT_TYPE.CHANGE_STYLE, null);\n // }\n clone(): Style {\n return new Style(this, null);\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/body-helper/style/Style.ts"],"names":[],"mappings":";;;AAuBA,IAAI,YAAmB,CAAC;AACxB,yDAAsD;AACtD,MAAM,gBAAgB,GAAG;IACvB,YAAY,EAAE,cAAuB;CACtC,CAAC;AAEF,MAAa,KAAM,SAAQ,yBAAW;IA8BpC,MAAM,KAAK,UAAU;QACnB,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IACD,MAAM,KAAK,OAAO;QAChB,OAAO,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,GAAG,IAAI,KAAK,EAAE,CA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CAAC;IACD,IAAI,SAAS,CAAC,SAA0C;QACtD,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAE9B,CAAC;IACD,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IACD,IAAI,MAAM,CAAC,MAAwC;QACjD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAExB,CAAC;IACD,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IACD,IAAI,eAAe,CAAC,eAAqD;QACvE,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;IAE1C,CAAC;IACD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IACD,IAAI,cAAc,CAAC,cAAmD;QACpE,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;IAExC,CAAC;IACD,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IACD,IAAI,MAAM,CAAC,MAAwC;QACjD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAExB,CAAC;IAID,KAAK;QACH,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF;AA9QD,sBA8QC","file":"Style.js","sourcesContent":["/* eslint-disable no-undef */\nimport type {\n ColorPropertyDefine,\n ColumnStyle,\n IStyleOption,\n TextOverflow,\n UnderlinePropertyDefine,\n LineThroughPropertyDefine,\n LineDashPropertyDefine,\n ColorsPropertyDefine,\n PaddingsPropertyDefine,\n CursorPropertyDefine,\n LineWidthsPropertyDefine,\n LineDashsPropertyDefine,\n MarkedPropertyDefine,\n FontSizePropertyDefine,\n FontFamilyPropertyDefine,\n FontWeightPropertyDefine,\n FontVariantPropertyDefine,\n FontStylePropertyDefine,\n TextAlignType,\n TextBaselineType\n} from '../../ts-types';\nlet defaultStyle: Style;\nimport { EventTarget } from '../../event/EventTarget';\nconst STYLE_EVENT_TYPE = {\n CHANGE_STYLE: 'change_style' as const\n};\n\nexport class Style extends EventTarget implements ColumnStyle {\n private _color?: ColorPropertyDefine;\n private _strokeColor?: ColorPropertyDefine;\n private _fontSize?: FontSizePropertyDefine;\n private _fontFamily?: FontFamilyPropertyDefine;\n private _fontWeight?: FontWeightPropertyDefine;\n private _fontVariant?: FontVariantPropertyDefine;\n private _fontStyle?: FontStylePropertyDefine;\n private _padding?: PaddingsPropertyDefine;\n private _defaultPadding: PaddingsPropertyDefine = [10, 16, 10, 16];\n private _textStick: boolean | 'vertical' | 'horizontal';\n private _textStickBaseOnAlign: boolean;\n private _textOverflow?: TextOverflow;\n private _textAlign?: TextAlignType;\n private _textBaseline?: TextBaselineType;\n private _bgColor?: ColorPropertyDefine;\n private _borderColor?: ColorsPropertyDefine;\n private _lineHeight?: number;\n private _underline?: UnderlinePropertyDefine;\n private _underlineColor?: ColorPropertyDefine;\n private _underlineDash?: LineDashPropertyDefine;\n private _underlineOffset?: number;\n private _lineThrough?: LineThroughPropertyDefine;\n private _lineThroughColor?: ColorPropertyDefine;\n private _lineThroughDash?: LineDashPropertyDefine;\n private _linkColor?: ColorPropertyDefine;\n private _cursor?: CursorPropertyDefine;\n private _borderLineWidth?: LineWidthsPropertyDefine;\n private _borderLineDash?: LineDashsPropertyDefine;\n private _marked?: MarkedPropertyDefine;\n static get EVENT_TYPE(): { CHANGE_STYLE: 'change_style' } {\n return STYLE_EVENT_TYPE;\n }\n static get DEFAULT(): Style {\n return defaultStyle ? defaultStyle : (defaultStyle = new Style());\n }\n constructor(style: IStyleOption = {}, bodyStyle: IStyleOption = {}) {\n super();\n this._textAlign = style?.textAlign ?? bodyStyle?.textAlign; //|| \"left\";\n this._textBaseline = style?.textBaseline ?? bodyStyle?.textBaseline; //|| \"middle\";\n this._color = style?.color ?? bodyStyle?.color;\n this._strokeColor = style?.strokeColor ?? bodyStyle?.strokeColor;\n // icon为文字前后可添加的图表\n this._fontSize = style.fontSize ?? bodyStyle?.fontSize;\n this._fontFamily = style.fontFamily ?? bodyStyle?.fontFamily;\n this._fontWeight = style.fontWeight ?? bodyStyle?.fontWeight;\n this._fontVariant = style.fontVariant ?? bodyStyle?.fontVariant;\n this._fontStyle = style.fontStyle ?? bodyStyle?.fontStyle;\n //修改不能设置为0的情况\n this._padding = style?.padding ?? bodyStyle?.padding ?? this._defaultPadding;\n this._borderColor = style?.borderColor ?? bodyStyle?.borderColor;\n this._textOverflow = style?.textOverflow ?? bodyStyle?.textOverflow; //|| \"clip\";\n this._textStick = style.textStick ?? bodyStyle?.textStick ?? false;\n this._textStickBaseOnAlign = style.textStickBaseOnAlign ?? bodyStyle?.textStickBaseOnAlign ?? false;\n this._bgColor = style?.bgColor ?? bodyStyle?.bgColor;\n this._lineHeight = style?.lineHeight ?? bodyStyle?.lineHeight;\n this._underline = style?.underline ?? bodyStyle?.underline;\n this._underlineColor = style?.underlineColor ?? bodyStyle?.underlineColor;\n this._underlineDash = style?.underlineDash ?? bodyStyle?.underlineDash;\n this._underlineOffset = style?.underlineOffset ?? bodyStyle?.underlineOffset;\n this._lineThrough = style?.lineThrough ?? bodyStyle?.lineThrough;\n this._lineThroughColor = style?.lineThroughColor ?? bodyStyle?.lineThroughColor;\n this._lineThroughDash = style?.lineThroughDash ?? bodyStyle?.lineThroughDash;\n this._linkColor = style?.linkColor ?? bodyStyle?.linkColor;\n this._cursor = style.cursor ?? bodyStyle?.cursor;\n this._borderLineWidth = style.borderLineWidth ?? bodyStyle?.borderLineWidth;\n this._borderLineDash = style.borderLineDash ?? bodyStyle?.borderLineDash;\n this._marked = style.marked ?? bodyStyle?.marked;\n }\n get color(): ColorPropertyDefine | undefined {\n return this._color;\n }\n set color(color: ColorPropertyDefine | undefined) {\n this._color = color;\n // this.doChangeStyle();\n }\n get strokeColor(): ColorPropertyDefine | undefined {\n return this._strokeColor;\n }\n set strokeColor(strokeColor: ColorPropertyDefine | undefined) {\n this._strokeColor = strokeColor;\n // this.doChangeStyle();\n }\n get fontSize(): FontSizePropertyDefine | undefined {\n return this._fontSize;\n }\n set fontSize(fontSize: FontSizePropertyDefine | undefined) {\n this._fontSize = fontSize;\n // this.doChangeStyle();\n }\n get fontFamily(): FontFamilyPropertyDefine | undefined {\n return this._fontFamily;\n }\n set fontFamily(fontFamily: FontFamilyPropertyDefine | undefined) {\n this._fontFamily = fontFamily;\n // this.doChangeStyle();\n }\n get fontWeight(): FontWeightPropertyDefine | undefined {\n return this._fontWeight;\n }\n set fontWeight(fontWeight: FontWeightPropertyDefine | undefined) {\n this._fontWeight = fontWeight;\n // this.doChangeStyle();\n }\n get fontVariant(): FontVariantPropertyDefine | undefined {\n return this._fontVariant;\n }\n set fontVariant(fontVariant: FontVariantPropertyDefine | undefined) {\n this._fontVariant = fontVariant;\n // this.doChangeStyle();\n }\n get fontStyle(): FontStylePropertyDefine | undefined {\n return this._fontStyle;\n }\n set fontStyle(fontStyle: FontStylePropertyDefine | undefined) {\n this._fontStyle = fontStyle;\n // this.doChangeStyle();\n }\n get padding(): PaddingsPropertyDefine | undefined {\n return this._padding;\n }\n set padding(padding: PaddingsPropertyDefine | undefined) {\n this._padding = padding;\n // this.doChangeStyle();\n }\n get textOverflow(): TextOverflow | undefined {\n return this._textOverflow;\n }\n set textOverflow(textOverflow: TextOverflow | undefined) {\n this._textOverflow = textOverflow;\n // this.doChangeStyle();\n }\n get bgColor(): ColorPropertyDefine | undefined {\n return this._bgColor;\n }\n set bgColor(bgColor: ColorPropertyDefine | undefined) {\n this._bgColor = bgColor;\n // this.doChangeStyle();\n }\n get borderColor(): ColorsPropertyDefine | undefined {\n return this._borderColor;\n }\n set borderColor(borderColor: ColorsPropertyDefine | undefined) {\n this._borderColor = borderColor;\n // this.doChangeStyle();\n }\n get textStick(): boolean | 'vertical' | 'horizontal' {\n return this._textStick;\n }\n set textStick(textStick: boolean | 'vertical' | 'horizontal') {\n this._textStick = textStick;\n // this.doChangeStyle();\n }\n get textStickBaseOnAlign(): boolean {\n return this._textStickBaseOnAlign;\n }\n set textStickBaseOnAlign(textStickBaseOnAlign: boolean) {\n this._textStickBaseOnAlign = textStickBaseOnAlign;\n // this.doChangeStyle();\n }\n get textAlign(): TextAlignType | undefined {\n return this._textAlign;\n }\n set textAlign(textAlign: TextAlignType | undefined) {\n this._textAlign = textAlign;\n // this.doChangeStyle();\n }\n get textBaseline(): TextBaselineType | undefined {\n return this._textBaseline;\n }\n set textBaseline(textBaseline: TextBaselineType | undefined) {\n this._textBaseline = textBaseline;\n // this.doChangeStyle();\n }\n get lineHeight(): number | undefined {\n return this._lineHeight;\n }\n set lineHeight(lineHeight: number | undefined) {\n this._lineHeight = lineHeight;\n // this.doChangeStyle();\n }\n get underline(): UnderlinePropertyDefine | undefined {\n return this._underline;\n }\n set underline(underline: UnderlinePropertyDefine | undefined) {\n this._underline = underline;\n // this.doChangeStyle();\n }\n get underlineColor(): ColorPropertyDefine | undefined {\n return this._underlineColor;\n }\n set underlineColor(underlineColor: ColorPropertyDefine | undefined) {\n this._underlineColor = underlineColor;\n // this.doChangeStyle();\n }\n get underlineDash(): LineDashPropertyDefine | undefined {\n return this._underlineDash;\n }\n set underlineDash(underlineDash: LineDashPropertyDefine | undefined) {\n this._underlineDash = underlineDash;\n // this.doChangeStyle();\n }\n get underlineOffset(): number | undefined {\n return this._underlineOffset;\n }\n set underlineOffset(underlineOffset: number | undefined) {\n this._underlineOffset = underlineOffset;\n }\n get lineThrough(): LineThroughPropertyDefine | undefined {\n return this._lineThrough;\n }\n set lineThrough(lineThrough: LineThroughPropertyDefine | undefined) {\n this._lineThrough = lineThrough;\n // this.doChangeStyle();\n }\n get lineThroughColor(): ColorPropertyDefine | undefined {\n return this._lineThroughColor;\n }\n set lineThroughColor(lineThroughColor: ColorPropertyDefine | undefined) {\n this._lineThroughColor = lineThroughColor;\n // this.doChangeStyle();\n }\n get lineThroughDash(): LineDashPropertyDefine | undefined {\n return this._lineThroughDash;\n }\n set lineThroughDash(lineThroughDash: LineDashPropertyDefine | undefined) {\n this._lineThroughDash = lineThroughDash;\n // this.doChangeStyle();\n }\n get linkColor(): ColorPropertyDefine | undefined {\n return this._linkColor;\n }\n set linkColor(linkColor: ColorPropertyDefine | undefined) {\n this._linkColor = linkColor;\n // this.doChangeStyle();\n }\n get cursor(): CursorPropertyDefine | undefined {\n return this._cursor;\n }\n set cursor(cursor: CursorPropertyDefine | undefined) {\n this._cursor = cursor;\n // this.doChangeStyle();\n }\n get borderLineWidth(): LineWidthsPropertyDefine | undefined {\n return this._borderLineWidth;\n }\n set borderLineWidth(borderLineWidth: LineWidthsPropertyDefine | undefined) {\n this._borderLineWidth = borderLineWidth;\n // this.doChangeStyle();\n }\n get borderLineDash(): LineDashsPropertyDefine | undefined {\n return this._borderLineDash;\n }\n set borderLineDash(borderLineDash: LineDashsPropertyDefine | undefined) {\n this._borderLineDash = borderLineDash;\n // this.doChangeStyle();\n }\n get marked(): MarkedPropertyDefine | undefined {\n return this._marked;\n }\n set marked(marked: MarkedPropertyDefine | undefined) {\n this._marked = marked;\n // this.doChangeStyle();\n }\n // doChangeStyle(): void {\n // this.fireListeners(STYLE_EVENT_TYPE.CHANGE_STYLE, null);\n // }\n clone(): Style {\n return new Style(this, null);\n }\n}\n"]}
@@ -23,6 +23,7 @@ export declare class CartesianAxis {
23
23
  tickData: DataView;
24
24
  scale: BandAxisScale | LinearAxisScale;
25
25
  component: LineAxis;
26
+ padding: [number, number, number, number];
26
27
  constructor(option: ICellAxisOption, width: number, height: number, padding: [number, number, number, number], table: BaseTableAPI);
27
28
  initScale(): void;
28
29
  initData(): void;
@@ -9,15 +9,17 @@ const vutils_1 = require("@visactor/vutils"), vrender_components_1 = require("@v
9
9
  class CartesianAxis {
10
10
  constructor(option, width, height, padding, table) {
11
11
  var _a, _b, _c;
12
- if (this.x = 0, this.y = 0, this.table = table, this.orient = null !== (_a = option.orient) && void 0 !== _a ? _a : "left",
12
+ if (this.x = 0, this.y = 0, this.padding = padding, this.table = table, this.orient = null !== (_a = option.orient) && void 0 !== _a ? _a : "left",
13
13
  this.type = null !== (_b = option.type) && void 0 !== _b ? _b : "band", this.option = (0,
14
14
  vutils_1.merge)({}, (0, get_axis_attributes_1.getCommonAxis)(option.__vtableChartTheme), getTableAxisTheme(this.orient, table.theme), getChartSpecAxisTheme(this.orient, this.type, option.__vtableChartTheme), option),
15
15
  "left" === this.orient || "right" === this.orient) {
16
16
  const innerOffsetTop = 0, innerOffsetBottom = 0;
17
- this.width = width, this.height = height - padding[2] - innerOffsetBottom, this.y = padding[0] + innerOffsetTop;
17
+ this.width = width, this.height = height - padding[0] - padding[2] - innerOffsetBottom,
18
+ this.y = padding[0] + innerOffsetTop;
18
19
  } else if ("top" === this.orient || "bottom" === this.orient) {
19
20
  const innerOffsetLeft = 0, innerOffsetRight = 0;
20
- this.width = width - padding[1] - innerOffsetRight, this.height = height, this.x = padding[3] + innerOffsetLeft;
21
+ this.width = width - padding[1] - padding[3] - innerOffsetRight, this.height = height,
22
+ this.x = padding[3] + innerOffsetLeft;
21
23
  }
22
24
  this.visible = null === (_c = option.visible) || void 0 === _c || _c, this.inverse = "inverse" in option && !!option.inverse,
23
25
  "band" === option.type && (this.data = option.domain), this.initScale(), this.initData(),
@@ -67,17 +69,19 @@ class CartesianAxis {
67
69
  this.component = new vrender_components_1.LineAxis((0, vutils_1.merge)({
68
70
  disableTriggerEvent: this.table.options.disableInteraction
69
71
  }, axisStylrAttrs, attrs)), this.component.setAttributes(this.setLayoutStartPosition({
70
- x: 0,
71
- y: 0
72
+ x: this.x,
73
+ y: this.y
72
74
  })), this.component.originAxis = this;
73
75
  }
74
76
  resize(width, height) {
75
- this.width = width, this.height = height, this.updateScaleRange(), this.computeData();
77
+ this.width = width - ("top" === this.orient || "bottom" === this.orient ? this.padding[1] + this.padding[3] : 0),
78
+ this.height = height - ("left" === this.orient || "right" === this.orient ? this.padding[2] + this.padding[0] : 0),
79
+ this.updateScaleRange(), this.computeData();
76
80
  const axisStylrAttrs = (0, get_axis_attributes_1.getAxisAttributes)(this.option), attrs = this.getUpdateAttribute();
77
81
  attrs.verticalFactor = "top" === this.orient || "right" === this.orient ? -1 : 1,
78
82
  this.component.setAttributes((0, vutils_1.merge)({}, axisStylrAttrs, attrs)), this.component.setAttributes(this.setLayoutStartPosition({
79
- x: 0,
80
- y: 0
83
+ x: this.x,
84
+ y: this.y
81
85
  })), this.overlap();
82
86
  }
83
87
  overlap() {
@@ -106,8 +110,8 @@ class CartesianAxis {
106
110
  const size = "top" === this.orient || "bottom" === this.orient ? height : width;
107
111
  return {
108
112
  start: {
109
- x: this.x,
110
- y: this.y
113
+ x: 0,
114
+ y: 0
111
115
  },
112
116
  end: end,
113
117
  title: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/axis/axis.ts"],"names":[],"mappings":";;;AAAA,6CAA+E;AAG/E,qEAAiF;AACjF,+DAAyE;AACzE,2CAAkD;AAElD,6CAA6C;AAC7C,+CAAmG;AAEnG,iDAAuD;AAEvD,6CAAwC;AACxC,iDAAiD;AACjD,mDAA4C;AAG5C,MAAM,0BAA0B,GAAG,GAAG,CAAC;AACvC,MAAM,0BAA0B,GAAG,GAAG,CAAC;AACvC,MAAM,WAAW,GAAW,CAAC,KAAiB,EAAE,EAAE;IAChD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAYF,MAAa,aAAa;IAgBxB,YACE,MAAuB,EACvB,KAAa,EACb,MAAc,EACd,OAAyC,EACzC,KAAmB;;QAlBrB,MAAC,GAAW,CAAC,CAAC;QACd,MAAC,GAAW,CAAC,CAAC;QAmBZ,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAA,MAAM,CAAC,MAAM,mCAAI,MAAM,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,MAAA,MAAM,CAAC,IAAI,mCAAI,MAAM,CAAC;QAClC,IAAI,CAAC,MAAM,GAAG,IAAA,cAAK,EACjB,EAAE,EAEF,IAAA,mCAAa,EAAC,MAAM,CAAC,kBAAk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CAAC,YAAY,CAAC;KAC/C;SAAM,IAAI,MAAM,KAAK,QAAQ,EAAE;QAC9B,cAAc,GAAG,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC;KAClD;IACD,OAAO,IAAA,cAAK,EAAC,EAAE,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;AACrE,CAAC;AAED,SAAS,qBAAqB,CAC5B,MAAmB,EACnB,IAA6D,EAC7D,cAAoB;IAEpB,IAAI,CAAC,cAAc,EAAE;QACnB,OAAO,EAAE,CAAC;KACX;IACD,MAAM,SAAS,GAAG,cAAc,CAAC,IAAI,CAAC;IACtC,IAAI,aAAa,CAAC;IAClB,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,QAAQ,EAAE;QAC5D,aAAa,GAAG,cAAc,CAAC,UAAU,CAAC;KAC3C;SAAM,IAAI,IAAI,KAAK,MAAM,EAAE;QAC1B,aAAa,GAAG,cAAc,CAAC,QAAQ,CAAC;KACzC;IAED,IAAI,eAAe,CAAC;IACpB,IAAI,MAAM,KAAK,KAAK,IAAI,MAAM,KAAK,QAAQ,EAAE;QAC3C,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC;KACxC;SAAM,IAAI,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,OAAO,EAAE;QAClD,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC;KACxC;IACD,OAAO,IAAA,cAAK,EAAC,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC;AAC9D,CAAC","file":"axis.js","sourcesContent":["import { degreeToRadian, isNil, isValidNumber, merge } from '@visactor/vutils';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport type { ICellAxisOption } from '../../ts-types/component/axis';\nimport { LineAxis, type LineAxisAttributes } from '@visactor/vrender-components';\nimport { getAxisAttributes, getCommonAxis } from './get-axis-attributes';\nimport { isXAxis, isYAxis } from '../util/orient';\nimport type { IOrientType } from '../../ts-types/component/util';\nimport { BandAxisScale } from './band-scale';\nimport { registerDataSetInstanceParser, registerDataSetInstanceTransform } from '../util/register';\nimport type { Parser } from '@visactor/vdataset';\nimport { DataSet, DataView } from '@visactor/vdataset';\nimport type { IBaseScale } from '@visactor/vscale';\nimport { ticks } from './../../vrender';\nimport { LinearAxisScale } from './linear-scale';\nimport { doOverlap } from './label-overlap';\nimport type { TableTheme } from '../../themes/theme';\n\nconst DEFAULT_BAND_INNER_PADDING = 0.1;\nconst DEFAULT_BAND_OUTER_PADDING = 0.3;\nconst scaleParser: Parser = (scale: IBaseScale) => {\n return scale;\n};\n\nexport interface ICartesianAxis {\n new (\n option: ICellAxisOption,\n width: number,\n height: number,\n padding: [number, number, number, number],\n table: BaseTableAPI\n ): CartesianAxis;\n}\n\nexport class CartesianAxis {\n width: number;\n height: number;\n x: number = 0;\n y: number = 0;\n table: BaseTableAPI;\n option: ICellAxisOption;\n orient: IOrientType;\n visible: boolean;\n type: 'linear' | 'band' | 'point' | 'time' | 'log' | 'symlog';\n inverse: boolean;\n data?: any[];\n tickData: DataView;\n scale: BandAxisScale | LinearAxisScale;\n component: LineAxis;\n\n constructor(\n option: ICellAxisOption,\n width: number,\n height: number,\n padding: [number, number, number, number],\n table: BaseTableAPI\n ) {\n this.table = table;\n this.orient = option.orient ?? 'left';\n this.type = option.type ?? 'band';\n this.option = merge(\n {},\n // commonAxis,\n getCommonAxis(option.__vtableChartTheme),\n getTableAxisTheme(this.orient, table.theme),\n getChartSpecAxisTheme(this.orient, this.type, option.__vtableChartTheme),\n option\n );\n\n if (this.orient === 'left' || this.orient === 'right') {\n // const innerOffsetTop = this.option.innerOffset?.top ?? 0;\n // const innerOffsetBottom = this.option.innerOffset?.bottom ?? 0;\n const innerOffsetTop = 0;\n const innerOffsetBottom = 0;\n this.width = width;\n this.height = height - padding[2] - innerOffsetBottom;\n this.y = padding[0] + innerOffsetTop;\n } else if (this.orient === 'top' || this.orient === 'bottom') {\n // const innerOffsetLeft = this.option.innerOffset?.left ?? 0;\n // const innerOffsetRight = this.option.innerOffset?.right ?? 0;\n const innerOffsetLeft = 0;\n const innerOffsetRight = 0;\n this.width = width - padding[1] - innerOffsetRight;\n this.height = height;\n this.x = padding[3] + innerOffsetLeft;\n }\n\n this.visible = option.visible ?? true;\n this.inverse = 'inverse' in option ? !!option.inverse : false;\n if (option.type === 'band') {\n this.data = option.domain;\n }\n\n this.initScale();\n this.initData();\n this.createComponent();\n this.initEvent();\n }\n\n initScale() {\n const option = this.option as any;\n if (this.type === 'band' || this.type === 'point') {\n this.scale = new BandAxisScale();\n this.scale.bandPadding = option.bandPadding;\n this.scale.paddingInner = option.paddingInner;\n this.scale.paddingOuter = option.paddingOuter;\n this.scale.calcScales(DEFAULT_BAND_INNER_PADDING, DEFAULT_BAND_OUTER_PADDING); // 0.1 0.3\n this.scale.updateScaleDomain(this.data);\n this.updateScaleRange();\n } else if (this.type === 'linear' || this.type === 'time' || this.type === 'log' || this.type === 'symlog') {\n this.scale = new LinearAxisScale(this.type);\n this.scale.setExtraAttrFromSpec(\n option.nice,\n option.zero,\n option.range,\n option.expand,\n option.base,\n option.constant\n );\n this.scale.transformScaleDomain();\n this.scale.updateScaleDomain();\n this.updateScaleRange();\n }\n }\n\n initData() {\n if (!this.table._vDataSet) {\n this.table._vDataSet = new DataSet();\n }\n\n registerDataSetInstanceParser(this.table._vDataSet, 'scale', scaleParser);\n registerDataSetInstanceTransform(this.table._vDataSet, 'ticks', ticks);\n\n const label = this.option.label || {};\n const tick = this.option.tick || {};\n\n const tickData = new DataView(this.table._vDataSet)\n .parse(this.scale._scale, {\n type: 'scale'\n })\n .transform(\n {\n type: 'ticks',\n options: {\n sampling: this.option.sampling !== false, // default do sampling\n tickCount: tick.tickCount,\n forceTickCount: tick.forceTickCount,\n tickStep: tick.tickStep,\n tickMode: tick.tickMode,\n noDecimals: tick.noDecimals,\n\n axisOrientType: this.orient,\n coordinateType: 'cartesian',\n\n labelStyle: label.style,\n labelFormatter: label.formatMethod,\n labelGap: label.minGap,\n\n labelLastVisible: label.lastVisible,\n labelFlush: label.flush\n }\n },\n false\n );\n this.tickData = tickData;\n\n this.computeData();\n }\n\n computeData(): void {\n this.tickData.reRunAllTransform();\n }\n\n initEvent() {\n // to be added\n }\n\n createComponent() {\n const axisStylrAttrs = getAxisAttributes(this.option);\n const attrs = this.getUpdateAttribute();\n attrs.verticalFactor = this.orient === 'top' || this.orient === 'right' ? -1 : 1;\n this.component = new LineAxis(\n merge(\n {\n disableTriggerEvent: this.table.options.disableInteraction\n },\n axisStylrAttrs,\n attrs\n )\n );\n this.component.setAttributes(this.setLayoutStartPosition({ x: 0, y: 0 }));\n (this.component as any).originAxis = this;\n }\n\n resize(width: number, height: number) {\n this.width = width;\n this.height = height;\n this.updateScaleRange();\n this.computeData();\n const axisStylrAttrs = getAxisAttributes(this.option);\n const attrs = this.getUpdateAttribute();\n attrs.verticalFactor = this.orient === 'top' || this.orient === 'right' ? -1 : 1;\n this.component.setAttributes(merge({}, axisStylrAttrs, attrs));\n this.component.setAttributes(this.setLayoutStartPosition({ x: 0, y: 0 }));\n this.overlap();\n }\n\n overlap() {\n doOverlap(this.component, this);\n }\n\n getLayoutRect() {\n // const padding = getQuadProps(this.table.theme.bodyStyle.padding as number);\n return {\n // width: this.width - (this.orient === 'top' || this.orient === 'bottom' ? padding[3] + padding[1] : 0),\n // height: this.height - (this.orient === 'left' || this.orient === 'right' ? padding[0] + padding[2] : 0)\n width: this.width,\n height: this.height\n };\n }\n\n getUpdateAttribute() {\n // 获取更新的坐标轴属性\n const regionHeight = this.table.tableNoFrameHeight;\n const regionWidth = this.table.tableNoFrameWidth;\n\n const { width, height } = this.getLayoutRect();\n const isX = isXAxis(this.orient);\n const isY = isYAxis(this.orient);\n let end = { x: 0, y: 0 };\n let gridLength = 0;\n let axisLength = 0;\n if (isX) {\n end = { x: width, y: 0 };\n gridLength = regionHeight;\n axisLength = width;\n } else if (isY) {\n end = { x: 0, y: height };\n gridLength = regionWidth;\n axisLength = height;\n }\n const size = this.orient === 'top' || this.orient === 'bottom' ? height : width;\n const attrs: LineAxisAttributes = {\n start: { x: this.x, y: this.y },\n end,\n // grid: {\n // type: 'line',\n // length: gridLength,\n // visible: this.option.grid.visible\n // },\n title: {\n text: this.option.title.text as string,\n maxWidth: this._getTitleLimit(isX)\n },\n items: this.getLabelItems(axisLength),\n verticalLimitSize: size,\n verticalMinSize: size\n };\n return attrs;\n }\n\n getLabelItems(length: number) {\n return [\n this.tickData.latestData\n .map((obj: any) => {\n return {\n id: obj.value,\n label: obj.value,\n value: length === 0 ? 0 : this.scale.dataToPosition([obj.value]) / length,\n rawValue: obj.value\n };\n })\n .filter((entry: any) => entry.value >= 0 && entry.value <= 1)\n ];\n }\n\n updateScaleRange() {\n const right = this.option.innerOffset?.right ?? 0;\n const left = this.option.innerOffset?.left ?? 0;\n const top = this.option.innerOffset?.top ?? 0;\n const bottom = this.option.innerOffset?.bottom ?? 0;\n\n const { width, height } = this.getLayoutRect();\n const inverse = (this.option as any).inverse || false;\n let newRange: [number, number] = [0, 0];\n if (isXAxis(this.orient)) {\n if (isValidNumber(width)) {\n // newRange = inverse ? [width, 0] : [0, width];\n newRange = inverse ? [width - right, left] : [left, width - right];\n }\n } else {\n if (isValidNumber(height)) {\n // newRange = inverse ? [0, height] : [height, 0];\n newRange = inverse ? [top, height - bottom] : [height - bottom, top];\n }\n }\n\n this.scale.updateRange(newRange);\n }\n\n setLayoutStartPosition(pos: any) {\n let { x, y } = pos;\n\n if (isValidNumber(x)) {\n x += Number(this.orient === 'left') * this.getLayoutRect().width;\n }\n if (isValidNumber(y)) {\n y += Number(this.orient === 'top') * this.getLayoutRect().height;\n }\n\n return { x, y };\n // super.setLayoutStartPosition({ x, y });\n }\n\n private _getTitleLimit(isX: boolean) {\n if (this.option.title.visible && isNil(this.option.title.style?.maxLineWidth)) {\n let angle = this.option.title.style?.angle || 0;\n if (this.option.title?.autoRotate && isNil(this.option.title.angle)) {\n angle = this.option.orient === 'left' ? -90 : 90;\n }\n if (isX) {\n const width = this.getLayoutRect().width;\n const cosValue = Math.abs(Math.cos(degreeToRadian(angle)));\n // VRender 接收到的limit是考虑角度计算后的宽度\n // TODO:还需要考虑angle后,高度是否太高,综合计算一个limit,比如高度不能超过图表整体高度的1/4\n return cosValue < 1e-6 ? Infinity : width / cosValue;\n }\n const height = this.getLayoutRect().height;\n const sinValue = Math.abs(Math.sin(degreeToRadian(angle)));\n\n // TODO:还需要考虑angle后,宽度是否太宽,综合计算一个limit,比如宽度度不能超过图表整体宽度的1/4\n return sinValue < 1e-6 ? Infinity : height / sinValue;\n }\n\n return null;\n }\n\n getScale() {\n return this.scale._scale;\n }\n\n getDomainSpec() {\n return (this.scale as LinearAxisScale).domain;\n }\n}\n\nfunction getTableAxisTheme(orient: IOrientType, theme: TableTheme) {\n let directionStyle;\n if (orient === 'left') {\n directionStyle = theme.axisStyle.leftAxisStyle;\n } else if (orient === 'right') {\n directionStyle = theme.axisStyle.rightAxisStyle;\n } else if (orient === 'top') {\n directionStyle = theme.axisStyle.topAxisStyle;\n } else if (orient === 'bottom') {\n directionStyle = theme.axisStyle.bottomAxisStyle;\n }\n return merge({}, theme.axisStyle.defaultAxisStyle, directionStyle);\n}\n\nfunction getChartSpecAxisTheme(\n orient: IOrientType,\n type: 'linear' | 'band' | 'point' | 'time' | 'log' | 'symlog',\n chartSpecTheme?: any\n) {\n if (!chartSpecTheme) {\n return {};\n }\n const axisTheme = chartSpecTheme.axis;\n let axisTypeTheme;\n if (type === 'linear' || type === 'log' || type === 'symlog') {\n axisTypeTheme = chartSpecTheme.axisLinear;\n } else if (type === 'band') {\n axisTypeTheme = chartSpecTheme.axisBand;\n }\n\n let axisOrientTheme;\n if (orient === 'top' || orient === 'bottom') {\n axisOrientTheme = chartSpecTheme.axisX;\n } else if (orient === 'left' || orient === 'right') {\n axisOrientTheme = chartSpecTheme.axisY;\n }\n return merge({}, axisTheme, axisTypeTheme, axisOrientT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Ac,GAAG,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC;KACjD;SAAM,IAAI,MAAM,KAAK,KAAK,EAAE;QAC3B,cAAc,GAAG,KAAK,CAAC,SAAS,CAAC,YAAY,CAAC;KAC/C;SAAM,IAAI,MAAM,KAAK,QAAQ,EAAE;QAC9B,cAAc,GAAG,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC;KAClD;IACD,OAAO,IAAA,cAAK,EAAC,EAAE,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;AACrE,CAAC;AAED,SAAS,qBAAqB,CAC5B,MAAmB,EACnB,IAA6D,EAC7D,cAAoB;IAEpB,IAAI,CAAC,cAAc,EAAE;QACnB,OAAO,EAAE,CAAC;KACX;IACD,MAAM,SAAS,GAAG,cAAc,CAAC,IAAI,CAAC;IACtC,IAAI,aAAa,CAAC;IAClB,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,QAAQ,EAAE;QAC5D,aAAa,GAAG,cAAc,CAAC,UAAU,CAAC;KAC3C;SAAM,IAAI,IAAI,KAAK,MAAM,EAAE;QAC1B,aAAa,GAAG,cAAc,CAAC,QAAQ,CAAC;KACzC;IAED,IAAI,eAAe,CAAC;IACpB,IAAI,MAAM,KAAK,KAAK,IAAI,MAAM,KAAK,QAAQ,EAAE;QAC3C,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC;KACxC;SAAM,IAAI,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,OAAO,EAAE;QAClD,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC;KACxC;IACD,OAAO,IAAA,cAAK,EAAC,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC;AAC9D,CAAC","file":"axis.js","sourcesContent":["import { degreeToRadian, isNil, isValidNumber, merge } from '@visactor/vutils';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport type { ICellAxisOption } from '../../ts-types/component/axis';\nimport { LineAxis, type LineAxisAttributes } from '@visactor/vrender-components';\nimport { getAxisAttributes, getCommonAxis } from './get-axis-attributes';\nimport { isXAxis, isYAxis } from '../util/orient';\nimport type { IOrientType } from '../../ts-types/component/util';\nimport { BandAxisScale } from './band-scale';\nimport { registerDataSetInstanceParser, registerDataSetInstanceTransform } from '../util/register';\nimport type { Parser } from '@visactor/vdataset';\nimport { DataSet, DataView } from '@visactor/vdataset';\nimport type { IBaseScale } from '@visactor/vscale';\nimport { ticks } from './../../vrender';\nimport { LinearAxisScale } from './linear-scale';\nimport { doOverlap } from './label-overlap';\nimport type { TableTheme } from '../../themes/theme';\n\nconst DEFAULT_BAND_INNER_PADDING = 0.1;\nconst DEFAULT_BAND_OUTER_PADDING = 0.3;\nconst scaleParser: Parser = (scale: IBaseScale) => {\n return scale;\n};\n\nexport interface ICartesianAxis {\n new (\n option: ICellAxisOption,\n width: number,\n height: number,\n padding: [number, number, number, number],\n table: BaseTableAPI\n ): CartesianAxis;\n}\n\nexport class CartesianAxis {\n width: number;\n height: number;\n x: number = 0;\n y: number = 0;\n table: BaseTableAPI;\n option: ICellAxisOption;\n orient: IOrientType;\n visible: boolean;\n type: 'linear' | 'band' | 'point' | 'time' | 'log' | 'symlog';\n inverse: boolean;\n data?: any[];\n tickData: DataView;\n scale: BandAxisScale | LinearAxisScale;\n component: LineAxis;\n padding: [number, number, number, number];\n\n constructor(\n option: ICellAxisOption,\n width: number,\n height: number,\n padding: [number, number, number, number],\n table: BaseTableAPI\n ) {\n this.padding = padding;\n this.table = table;\n this.orient = option.orient ?? 'left';\n this.type = option.type ?? 'band';\n this.option = merge(\n {},\n // commonAxis,\n getCommonAxis(option.__vtableChartTheme),\n getTableAxisTheme(this.orient, table.theme),\n getChartSpecAxisTheme(this.orient, this.type, option.__vtableChartTheme),\n option\n );\n\n if (this.orient === 'left' || this.orient === 'right') {\n // const innerOffsetTop = this.option.innerOffset?.top ?? 0;\n // const innerOffsetBottom = this.option.innerOffset?.bottom ?? 0;\n const innerOffsetTop = 0;\n const innerOffsetBottom = 0;\n this.width = width;\n this.height = height - padding[0] - padding[2] - innerOffsetBottom;\n this.y = padding[0] + innerOffsetTop;\n } else if (this.orient === 'top' || this.orient === 'bottom') {\n // const innerOffsetLeft = this.option.innerOffset?.left ?? 0;\n // const innerOffsetRight = this.option.innerOffset?.right ?? 0;\n const innerOffsetLeft = 0;\n const innerOffsetRight = 0;\n this.width = width - padding[1] - padding[3] - innerOffsetRight;\n this.height = height;\n this.x = padding[3] + innerOffsetLeft;\n }\n\n this.visible = option.visible ?? true;\n this.inverse = 'inverse' in option ? !!option.inverse : false;\n if (option.type === 'band') {\n this.data = option.domain;\n }\n\n this.initScale();\n this.initData();\n this.createComponent();\n this.initEvent();\n }\n\n initScale() {\n const option = this.option as any;\n if (this.type === 'band' || this.type === 'point') {\n this.scale = new BandAxisScale();\n this.scale.bandPadding = option.bandPadding;\n this.scale.paddingInner = option.paddingInner;\n this.scale.paddingOuter = option.paddingOuter;\n this.scale.calcScales(DEFAULT_BAND_INNER_PADDING, DEFAULT_BAND_OUTER_PADDING); // 0.1 0.3\n this.scale.updateScaleDomain(this.data);\n this.updateScaleRange();\n } else if (this.type === 'linear' || this.type === 'time' || this.type === 'log' || this.type === 'symlog') {\n this.scale = new LinearAxisScale(this.type);\n this.scale.setExtraAttrFromSpec(\n option.nice,\n option.zero,\n option.range,\n option.expand,\n option.base,\n option.constant\n );\n this.scale.transformScaleDomain();\n this.scale.updateScaleDomain();\n this.updateScaleRange();\n }\n }\n\n initData() {\n if (!this.table._vDataSet) {\n this.table._vDataSet = new DataSet();\n }\n\n registerDataSetInstanceParser(this.table._vDataSet, 'scale', scaleParser);\n registerDataSetInstanceTransform(this.table._vDataSet, 'ticks', ticks);\n\n const label = this.option.label || {};\n const tick = this.option.tick || {};\n\n const tickData = new DataView(this.table._vDataSet)\n .parse(this.scale._scale, {\n type: 'scale'\n })\n .transform(\n {\n type: 'ticks',\n options: {\n sampling: this.option.sampling !== false, // default do sampling\n tickCount: tick.tickCount,\n forceTickCount: tick.forceTickCount,\n tickStep: tick.tickStep,\n tickMode: tick.tickMode,\n noDecimals: tick.noDecimals,\n\n axisOrientType: this.orient,\n coordinateType: 'cartesian',\n\n labelStyle: label.style,\n labelFormatter: label.formatMethod,\n labelGap: label.minGap,\n\n labelLastVisible: label.lastVisible,\n labelFlush: label.flush\n }\n },\n false\n );\n this.tickData = tickData;\n\n this.computeData();\n }\n\n computeData(): void {\n this.tickData.reRunAllTransform();\n }\n\n initEvent() {\n // to be added\n }\n\n createComponent() {\n const axisStylrAttrs = getAxisAttributes(this.option);\n const attrs = this.getUpdateAttribute();\n attrs.verticalFactor = this.orient === 'top' || this.orient === 'right' ? -1 : 1;\n this.component = new LineAxis(\n merge(\n {\n disableTriggerEvent: this.table.options.disableInteraction\n },\n axisStylrAttrs,\n attrs\n )\n );\n this.component.setAttributes(this.setLayoutStartPosition({ x: this.x, y: this.y }));\n (this.component as any).originAxis = this;\n }\n\n resize(width: number, height: number) {\n this.width = width - (this.orient === 'top' || this.orient === 'bottom' ? this.padding[1] + this.padding[3] : 0);\n this.height = height - (this.orient === 'left' || this.orient === 'right' ? this.padding[2] + this.padding[0] : 0);\n this.updateScaleRange();\n this.computeData();\n const axisStylrAttrs = getAxisAttributes(this.option);\n const attrs = this.getUpdateAttribute();\n attrs.verticalFactor = this.orient === 'top' || this.orient === 'right' ? -1 : 1;\n this.component.setAttributes(merge({}, axisStylrAttrs, attrs));\n this.component.setAttributes(this.setLayoutStartPosition({ x: this.x, y: this.y }));\n this.overlap();\n }\n\n overlap() {\n doOverlap(this.component, this);\n }\n\n getLayoutRect() {\n // const padding = getQuadProps(this.table.theme.bodyStyle.padding as number);\n return {\n // width: this.width - (this.orient === 'top' || this.orient === 'bottom' ? padding[3] + padding[1] : 0),\n // height: this.height - (this.orient === 'left' || this.orient === 'right' ? padding[0] + padding[2] : 0)\n width: this.width,\n height: this.height\n };\n }\n\n getUpdateAttribute() {\n // 获取更新的坐标轴属性\n const regionHeight = this.table.tableNoFrameHeight;\n const regionWidth = this.table.tableNoFrameWidth;\n\n const { width, height } = this.getLayoutRect();\n const isX = isXAxis(this.orient);\n const isY = isYAxis(this.orient);\n let end = { x: 0, y: 0 };\n let gridLength = 0;\n let axisLength = 0;\n if (isX) {\n end = { x: width, y: 0 };\n gridLength = regionHeight;\n axisLength = width;\n } else if (isY) {\n end = { x: 0, y: height };\n gridLength = regionWidth;\n axisLength = height;\n }\n const size = this.orient === 'top' || this.orient === 'bottom' ? height : width;\n const attrs: LineAxisAttributes = {\n // start: { x: this.x, y: this.y },\n // x: this.x,\n // y: this.y,\n start: { x: 0, y: 0 },\n end,\n // grid: {\n // type: 'line',\n // length: gridLength,\n // visible: this.option.grid.visible\n // },\n title: {\n text: this.option.title.text as string,\n maxWidth: this._getTitleLimit(isX)\n },\n items: this.getLabelItems(axisLength),\n verticalLimitSize: size,\n verticalMinSize: size\n };\n return attrs;\n }\n\n getLabelItems(length: number) {\n return [\n this.tickData.latestData\n .map((obj: any) => {\n return {\n id: obj.value,\n label: obj.value,\n value: length === 0 ? 0 : this.scale.dataToPosition([obj.value]) / length,\n rawValue: obj.value\n };\n })\n .filter((entry: any) => entry.value >= 0 && entry.value <= 1)\n ];\n }\n\n updateScaleRange() {\n const right = this.option.innerOffset?.right ?? 0;\n const left = this.option.innerOffset?.left ?? 0;\n const top = this.option.innerOffset?.top ?? 0;\n const bottom = this.option.innerOffset?.bottom ?? 0;\n\n const { width, height } = this.getLayoutRect();\n const inverse = (this.option as any).inverse || false;\n let newRange: [number, number] = [0, 0];\n if (isXAxis(this.orient)) {\n if (isValidNumber(width)) {\n // newRange = inverse ? [width, 0] : [0, width];\n newRange = inverse ? [width - right, left] : [left, width - right];\n }\n } else {\n if (isValidNumber(height)) {\n // newRange = inverse ? [0, height] : [height, 0];\n newRange = inverse ? [top, height - bottom] : [height - bottom, top];\n }\n }\n\n this.scale.updateRange(newRange);\n }\n\n setLayoutStartPosition(pos: any) {\n let { x, y } = pos;\n\n if (isValidNumber(x)) {\n x += Number(this.orient === 'left') * this.getLayoutRect().width;\n }\n if (isValidNumber(y)) {\n y += Number(this.orient === 'top') * this.getLayoutRect().height;\n }\n\n return { x, y };\n // super.setLayoutStartPosition({ x, y });\n }\n\n private _getTitleLimit(isX: boolean) {\n if (this.option.title.visible && isNil(this.option.title.style?.maxLineWidth)) {\n let angle = this.option.title.style?.angle || 0;\n if (this.option.title?.autoRotate && isNil(this.option.title.angle)) {\n angle = this.option.orient === 'left' ? -90 : 90;\n }\n if (isX) {\n const width = this.getLayoutRect().width;\n const cosValue = Math.abs(Math.cos(degreeToRadian(angle)));\n // VRender 接收到的limit是考虑角度计算后的宽度\n // TODO:还需要考虑angle后,高度是否太高,综合计算一个limit,比如高度不能超过图表整体高度的1/4\n return cosValue < 1e-6 ? Infinity : width / cosValue;\n }\n const height = this.getLayoutRect().height;\n const sinValue = Math.abs(Math.sin(degreeToRadian(angle)));\n\n // TODO:还需要考虑angle后,宽度是否太宽,综合计算一个limit,比如宽度度不能超过图表整体宽度的1/4\n return sinValue < 1e-6 ? Infinity : height / sinValue;\n }\n\n return null;\n }\n\n getScale() {\n return this.scale._scale;\n }\n\n getDomainSpec() {\n return (this.scale as LinearAxisScale).domain;\n }\n}\n\nfunction getTableAxisTheme(orient: IOrientType, theme: TableTheme) {\n let directionStyle;\n if (orient === 'left') {\n directionStyle = theme.axisStyle.leftAxisStyle;\n } else if (orient === 'right') {\n directionStyle = theme.axisStyle.rightAxisStyle;\n } else if (orient === 'top') {\n directionStyle = theme.axisStyle.topAxisStyle;\n } else if (orient === 'bottom') {\n directionStyle = theme.axisStyle.bottomAxisStyle;\n }\n return merge({}, theme.axisStyle.defaultAxisStyle, directionStyle);\n}\n\nfunction getChartSpecAxisTheme(\n orient: IOrientType,\n type: 'linear' | 'band' | 'point' | 'time' | 'log' | 'symlog',\n chartSpecTheme?: any\n) {\n if (!chartSpecTheme) {\n return {};\n }\n const axisTheme = chartSpecTheme.axis;\n let axisTypeTheme;\n if (type === 'linear' || type === 'log' || type === 'symlog') {\n axisTypeTheme = chartSpecTheme.axisLinear;\n } else if (type === 'band') {\n axisTypeTheme = chartSpecTheme.axisBand;\n }\n\n let axisOrientTheme;\n if (orient === 'top' || orient === 'bottom') {\n axisOrientTheme = chartSpecTheme.axisX;\n } else if (orient === 'left' || orient === 'right') {\n axisOrientTheme = chartSpecTheme.axisY;\n }\n return merge({}, axisTheme, axisTypeTheme, axisOrientTheme);\n}\n"]}
@@ -43,7 +43,7 @@ class BaseTable extends EventTarget_1.EventTarget {
43
43
  }
44
44
  constructor(container, options = {}) {
45
45
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
46
- if (super(), this.showFrozenIcon = !0, this.version = "1.6.0", this.id = `VTable${Date.now()}`,
46
+ if (super(), this.showFrozenIcon = !0, this.version = "1.6.2-alpha.1", this.id = `VTable${Date.now()}`,
47
47
  this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = (0, util_1.throttle2)(this.render.bind(this), 200),
48
48
  !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
49
49
  const {frozenColCount: frozenColCount = 0, frozenRowCount: frozenRowCount, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth, widthMode: widthMode = "standard", heightMode: heightMode = "standard", autoFillWidth: autoFillWidth = !1, autoFillHeight: autoFillHeight = !1, widthAdaptiveMode: widthAdaptiveMode = "only-body", heightAdaptiveMode: heightAdaptiveMode = "only-body", keyboardOptions: keyboardOptions, eventOptions: eventOptions, rowSeriesNumber: rowSeriesNumber, columnResizeMode: columnResizeMode, rowResizeMode: rowResizeMode = "none", dragHeaderMode: dragHeaderMode, showFrozenIcon: showFrozenIcon, allowFrozenColCount: allowFrozenColCount, padding: padding, hover: hover, menu: menu, select: click, customRender: customRender, pixelRatio: pixelRatio = pixel_ratio_1.defaultPixelRatio, renderChartAsync: renderChartAsync, renderChartAsyncBatchCount: renderChartAsyncBatchCount, mode: mode, modeParams: modeParams, canvasWidth: canvasWidth, canvasHeight: canvasHeight, overscrollBehavior: overscrollBehavior, limitMinWidth: limitMinWidth, limitMinHeight: limitMinHeight, clearDOM: clearDOM = !0} = options;
@@ -755,7 +755,7 @@ class BaseTable extends EventTarget_1.EventTarget {
755
755
  this.release();
756
756
  }
757
757
  release() {
758
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
758
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
759
759
  const internalProps = this.internalProps;
760
760
  null === (_b = null === (_a = internalProps.tooltipHandler) || void 0 === _a ? void 0 : _a.release) || void 0 === _b || _b.call(_a),
761
761
  null === (_d = null === (_c = internalProps.menuHandler) || void 0 === _c ? void 0 : _c.release) || void 0 === _d || _d.call(_c),
@@ -774,7 +774,7 @@ class BaseTable extends EventTarget_1.EventTarget {
774
774
  const {parentElement: parentElement} = internalProps.element;
775
775
  parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element),
776
776
  null === (_q = null === (_p = null === (_o = this.editorManager) || void 0 === _o ? void 0 : _o.editingEditor) || void 0 === _p ? void 0 : _p.onEnd) || void 0 === _q || _q.call(_p),
777
- this.isReleased = !0, this.scenegraph = null, this.internalProps = null;
777
+ this.isReleased = !0, this.scenegraph = null, this.internalProps = null, null === (_r = this.reactCustomLayout) || void 0 === _r || _r.clearCache();
778
778
  }
779
779
  fireListeners(type, event) {
780
780
  return super.fireListeners(type, event);