@visactor/vtable 0.9.2 → 0.9.3-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.
- package/README.md +15 -15
- package/cjs/ListTable.d.ts +2 -1
- package/cjs/ListTable.js +17 -13
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +69 -0
- package/cjs/PivotChart.js +445 -0
- package/cjs/PivotChart.js.map +1 -0
- package/cjs/PivotTable.d.ts +2 -1
- package/cjs/PivotTable.js +18 -13
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/body-helper/style/MultilineTextStyle.js +2 -2
- package/cjs/body-helper/style/MultilineTextStyle.js.map +1 -1
- package/cjs/body-helper/style/ProgressBarStyle.js +15 -15
- package/cjs/body-helper/style/ProgressBarStyle.js.map +1 -1
- package/cjs/body-helper/style/Style.d.ts +0 -1
- package/cjs/body-helper/style/Style.js +25 -28
- package/cjs/body-helper/style/Style.js.map +1 -1
- package/cjs/chartModule.js +14 -0
- package/cjs/chartModule.js.map +1 -0
- package/cjs/components/axis/axis.d.ts +45 -0
- package/cjs/components/axis/axis.js +146 -0
- package/cjs/components/axis/axis.js.map +1 -0
- package/cjs/components/axis/band-scale.d.ts +18 -0
- package/cjs/components/axis/band-scale.js +54 -0
- package/cjs/components/axis/band-scale.js.map +1 -0
- package/cjs/components/axis/get-axis-attributes.d.ts +136 -0
- package/cjs/components/axis/get-axis-attributes.js +169 -0
- package/cjs/components/axis/get-axis-attributes.js.map +1 -0
- package/cjs/components/axis/label-overlap.d.ts +3 -0
- package/cjs/components/axis/label-overlap.js +46 -0
- package/cjs/components/axis/label-overlap.js.map +1 -0
- package/cjs/components/axis/linear-scale.d.ts +45 -0
- package/cjs/components/axis/linear-scale.js +120 -0
- package/cjs/components/axis/linear-scale.js.map +1 -0
- package/cjs/components/legend/get-legend-attributes.d.ts +5 -0
- package/cjs/components/legend/get-legend-attributes.js +90 -0
- package/cjs/components/legend/get-legend-attributes.js.map +1 -0
- package/cjs/components/legend/legend.d.ts +23 -0
- package/cjs/components/legend/legend.js +94 -0
- package/cjs/components/legend/legend.js.map +1 -0
- package/{es → cjs/components}/menu/dom/BaseMenu.d.ts +2 -2
- package/cjs/components/menu/dom/BaseMenu.js.map +1 -0
- package/cjs/components/menu/dom/Menu.js.map +1 -0
- package/cjs/{menu → components/menu}/dom/MenuHandler.d.ts +2 -2
- package/cjs/{menu → components/menu}/dom/MenuHandler.js +1 -1
- package/cjs/components/menu/dom/MenuHandler.js.map +1 -0
- package/cjs/{menu → components/menu}/dom/logic/MenuContainer.d.ts +2 -2
- package/cjs/{menu → components/menu}/dom/logic/MenuContainer.js +2 -2
- package/cjs/components/menu/dom/logic/MenuContainer.js.map +1 -0
- package/cjs/{menu → components/menu}/dom/logic/MenuElement.d.ts +2 -2
- package/cjs/{menu → components/menu}/dom/logic/MenuElement.js +4 -4
- package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -0
- package/cjs/components/menu/dom/logic/MenuElementStyle.js.map +1 -0
- package/cjs/components/title/title.d.ts +12 -0
- package/cjs/components/title/title.js +66 -0
- package/cjs/components/title/title.js.map +1 -0
- package/{es → cjs/components}/tooltip/BaseTooltip.d.ts +3 -3
- package/cjs/components/tooltip/BaseTooltip.js.map +1 -0
- package/cjs/components/tooltip/Tooltip.js.map +1 -0
- package/cjs/{tooltip → components/tooltip}/TooltipHandler.d.ts +4 -4
- package/cjs/{tooltip → components/tooltip}/TooltipHandler.js +1 -1
- package/cjs/components/tooltip/TooltipHandler.js.map +1 -0
- package/{es → cjs/components}/tooltip/logic/BubbleTooltipElement.d.ts +4 -4
- package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElement.js +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +1 -0
- package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -0
- package/cjs/components/util/orient.d.ts +3 -0
- package/cjs/components/util/orient.js +14 -0
- package/cjs/components/util/orient.js.map +1 -0
- package/cjs/components/util/register.d.ts +3 -0
- package/cjs/components/util/register.js +15 -0
- package/cjs/components/util/register.js.map +1 -0
- package/cjs/components/util/tick-data/config.d.ts +1 -0
- package/cjs/components/util/tick-data/config.js +6 -0
- package/cjs/components/util/tick-data/config.js.map +1 -0
- package/cjs/components/util/tick-data/continuous.d.ts +2 -0
- package/cjs/components/util/tick-data/continuous.js +39 -0
- package/cjs/components/util/tick-data/continuous.js.map +1 -0
- package/cjs/components/util/tick-data/discrete/linear.d.ts +2 -0
- package/cjs/components/util/tick-data/discrete/linear.js +66 -0
- package/cjs/components/util/tick-data/discrete/linear.js.map +1 -0
- package/cjs/components/util/tick-data/discrete/polar-angle.d.ts +2 -0
- package/cjs/components/util/tick-data/discrete/polar-angle.js +46 -0
- package/cjs/components/util/tick-data/discrete/polar-angle.js.map +1 -0
- package/cjs/components/util/tick-data/index.d.ts +2 -0
- package/cjs/components/util/tick-data/index.js +17 -0
- package/cjs/components/util/tick-data/index.js.map +1 -0
- package/cjs/components/util/tick-data/util.d.ts +21 -0
- package/cjs/components/util/tick-data/util.js +115 -0
- package/cjs/components/util/tick-data/util.js.map +1 -0
- package/cjs/components/util/transform.d.ts +5 -0
- package/cjs/components/util/transform.js +45 -0
- package/cjs/components/util/transform.js.map +1 -0
- package/cjs/core/BaseTable.d.ts +18 -5
- package/cjs/core/BaseTable.js +115 -41
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +5 -0
- package/cjs/core/TABLE_EVENT_TYPE.js +6 -1
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/core/style.js +1 -1
- package/cjs/core/style.js.map +1 -1
- package/cjs/core/tableHelper.js +1 -2
- package/cjs/data/CachedDataSource.js +2 -1
- package/cjs/data/DataSource.js +2 -2
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/dataset/dataset-pivot-table.d.ts +60 -0
- package/cjs/dataset/dataset-pivot-table.js +387 -0
- package/cjs/dataset/dataset-pivot-table.js.map +1 -0
- package/cjs/dataset/dataset.d.ts +15 -19
- package/cjs/dataset/dataset.js +191 -200
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/dataset/statistics-helper.d.ts +67 -0
- package/cjs/dataset/statistics-helper.js +173 -0
- package/cjs/dataset/statistics-helper.js.map +1 -0
- package/cjs/dataset/util/zero-align.d.ts +10 -0
- package/cjs/dataset/util/zero-align.js +119 -0
- package/cjs/dataset/util/zero-align.js.map +1 -0
- package/cjs/event/EventHandler.js.map +1 -1
- package/cjs/event/EventTarget.d.ts +5 -5
- package/cjs/event/EventTarget.js +2 -2
- package/cjs/event/EventTarget.js.map +1 -1
- package/cjs/event/VChartEventProxy.d.ts +1 -0
- package/cjs/event/VChartEventProxy.js +1 -0
- package/cjs/event/VChartEventProxy.js.map +1 -0
- package/cjs/event/event.js +7 -4
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/table-group.js +8 -6
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/pivot-chart/axis-click.d.ts +2 -0
- package/cjs/event/pivot-chart/axis-click.js +42 -0
- package/cjs/event/pivot-chart/axis-click.js.map +1 -0
- package/cjs/event/pivot-chart/axis-hover.d.ts +2 -0
- package/cjs/event/pivot-chart/axis-hover.js +41 -0
- package/cjs/event/pivot-chart/axis-hover.js.map +1 -0
- package/cjs/event/scroll.js +4 -3
- package/cjs/event/scroll.js.map +1 -1
- package/cjs/event/sparkline-event.js +1 -2
- package/cjs/event/sparkline-event.js.map +1 -1
- package/cjs/header-helper/header-helper.js +1 -1
- package/cjs/header-helper/header-helper.js.map +1 -1
- package/cjs/header-helper/style/MultilineTextHeaderStyle.js +2 -2
- package/cjs/header-helper/style/MultilineTextHeaderStyle.js.map +1 -1
- package/cjs/header-helper/style/Style.d.ts +0 -1
- package/cjs/header-helper/style/Style.js +25 -28
- package/cjs/header-helper/style/Style.js.map +1 -1
- package/cjs/index.d.ts +4 -3
- package/cjs/index.js +11 -2
- package/cjs/index.js.map +1 -1
- package/cjs/layout/chart-helper/get-axis-config.d.ts +2 -0
- package/cjs/layout/chart-helper/get-axis-config.js +128 -0
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -0
- package/cjs/layout/chart-helper/get-chart-spec.d.ts +7 -0
- package/cjs/layout/chart-helper/get-chart-spec.js +141 -0
- package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -0
- package/cjs/layout/index.js +2 -1
- package/cjs/layout/pivot-header-layout.d.ts +13 -5
- package/cjs/layout/pivot-header-layout.js +50 -14
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/pivot-layout.d.ts +55 -8
- package/cjs/layout/pivot-layout.js +406 -92
- package/cjs/layout/pivot-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.d.ts +10 -0
- package/cjs/layout/simple-header-layout.js +43 -2
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/plugins/{chartTypes.js → chartModules.js} +1 -1
- package/cjs/plugins/chartModules.js.map +1 -0
- package/cjs/register.d.ts +1 -1
- package/cjs/register.js +6 -6
- package/cjs/register.js.map +1 -1
- package/cjs/render/layout/text.d.ts +33 -4
- package/cjs/render/layout/text.js +9 -3
- package/cjs/render/layout/text.js.map +1 -1
- package/cjs/scenegraph/component/custom.js +17 -16
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/component/menu.d.ts +41 -0
- package/cjs/scenegraph/component/table-component.js +3 -3
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.d.ts +4 -1
- package/cjs/scenegraph/graphic/chart.js +29 -17
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js +22 -3
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.d.ts +9 -9
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +48 -29
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/image-contribution-render.d.ts +3 -3
- package/cjs/scenegraph/graphic/contributions/image-contribution-render.js +2 -2
- package/cjs/scenegraph/graphic/contributions/image-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.d.ts +3 -3
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js +2 -2
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/text.d.ts +15 -0
- package/cjs/scenegraph/group-creater/cell-helper.js +9 -3
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +6 -5
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/column.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +3 -0
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +71 -0
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -0
- package/cjs/scenegraph/group-creater/progress/proxy.d.ts +2 -2
- package/cjs/scenegraph/group-creater/progress/proxy.js +45 -55
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.d.ts +1 -0
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +60 -26
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.d.ts +1 -0
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +94 -40
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +23 -15
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +20 -9
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/move-cell.js +1 -1
- package/cjs/scenegraph/layout/move-cell.js.map +1 -1
- package/cjs/scenegraph/layout/update-cell.js +3 -2
- package/cjs/scenegraph/layout/update-cell.js.map +1 -1
- package/cjs/scenegraph/layout/update-height.js +1 -1
- package/cjs/scenegraph/layout/update-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-row.js +1 -1
- package/cjs/scenegraph/layout/update-row.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +34 -3
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.d.ts +3 -0
- package/cjs/scenegraph/refresh-node/update-chart.js +76 -7
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +8 -0
- package/cjs/scenegraph/scenegraph.js +118 -21
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/stick-text/index.js +10 -8
- package/cjs/scenegraph/stick-text/index.js.map +1 -1
- package/cjs/scenegraph/style/corner-cell.d.ts +3 -0
- package/cjs/scenegraph/style/corner-cell.js +29 -0
- package/cjs/scenegraph/style/corner-cell.js.map +1 -0
- package/cjs/scenegraph/style/frame-border.d.ts +1 -0
- package/cjs/scenegraph/style/frame-border.js +3 -7
- package/cjs/scenegraph/style/frame-border.js.map +1 -1
- package/cjs/scenegraph/utils/get-cell-merge.js +2 -1
- package/cjs/scenegraph/utils/get-cell-merge.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/state/state.js +1 -1
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/DARK.js +1 -2
- package/cjs/themes/theme.d.ts +10 -0
- package/cjs/themes/theme.js +50 -4
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/tools/LimitPromiseQueue.js +2 -1
- package/cjs/tools/calc.d.ts +3 -0
- package/cjs/tools/calc.js +11 -3
- package/cjs/tools/calc.js.map +1 -1
- package/cjs/tools/debounce.js +1 -1
- package/cjs/tools/diff-cell.js +2 -2
- package/cjs/tools/dom.js +1 -1
- package/cjs/tools/env.js +1 -1
- package/cjs/ts-types/base-table.d.ts +29 -12
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/column/style.d.ts +0 -1
- package/cjs/ts-types/column/style.js.map +1 -1
- package/cjs/ts-types/component/axis.d.ts +12 -0
- package/cjs/ts-types/component/axis.js +6 -0
- package/cjs/ts-types/component/axis.js.map +1 -0
- package/cjs/ts-types/component/legend.d.ts +5 -0
- package/cjs/ts-types/component/legend.js +6 -0
- package/cjs/ts-types/component/legend.js.map +1 -0
- package/cjs/ts-types/component/title.d.ts +47 -0
- package/cjs/ts-types/component/title.js +6 -0
- package/cjs/ts-types/component/title.js.map +1 -0
- package/cjs/ts-types/component/util.d.ts +1 -0
- package/cjs/ts-types/component/util.js +6 -0
- package/cjs/ts-types/component/util.js.map +1 -0
- package/cjs/ts-types/customElement.d.ts +2 -0
- package/cjs/ts-types/customElement.js.map +1 -1
- package/cjs/ts-types/events.d.ts +108 -83
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
- package/cjs/ts-types/list-table/define/chart-define.d.ts +1 -1
- package/cjs/ts-types/list-table/define/chart-define.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.d.ts +4 -2
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/new-data-set.d.ts +21 -7
- package/cjs/ts-types/new-data-set.js +2 -2
- package/cjs/ts-types/new-data-set.js.map +1 -1
- package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.d.ts +4 -0
- package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +3 -1
- package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/ts-types/pivot-table/corner.d.ts +3 -3
- package/cjs/ts-types/pivot-table/corner.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/chart-indicator.d.ts +1 -1
- package/cjs/ts-types/pivot-table/indicator/chart-indicator.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/index.d.ts +1 -0
- package/cjs/ts-types/pivot-table/indicator/index.js.map +1 -1
- package/cjs/ts-types/pivot-table/title.d.ts +1 -1
- package/cjs/ts-types/pivot-table/title.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +27 -3
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +5 -0
- package/cjs/ts-types/theme.js.map +1 -1
- package/dist/vtable.js +37485 -24091
- package/dist/vtable.min.js +4 -2
- package/es/ListTable.d.ts +2 -1
- package/es/ListTable.js +17 -13
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +69 -0
- package/es/PivotChart.js +455 -0
- package/es/PivotChart.js.map +1 -0
- package/es/PivotTable.d.ts +2 -1
- package/es/PivotTable.js +19 -14
- package/es/PivotTable.js.map +1 -1
- package/es/body-helper/style/MultilineTextStyle.js +2 -2
- package/es/body-helper/style/MultilineTextStyle.js.map +1 -1
- package/es/body-helper/style/ProgressBarStyle.js +15 -15
- package/es/body-helper/style/ProgressBarStyle.js.map +1 -1
- package/es/body-helper/style/Style.d.ts +0 -1
- package/es/body-helper/style/Style.js +25 -28
- package/es/body-helper/style/Style.js.map +1 -1
- package/es/{chartType.js → chartModule.js} +2 -2
- package/es/chartModule.js.map +1 -0
- package/es/components/axis/axis.d.ts +45 -0
- package/es/components/axis/axis.js +155 -0
- package/es/components/axis/axis.js.map +1 -0
- package/es/components/axis/band-scale.d.ts +18 -0
- package/es/components/axis/band-scale.js +46 -0
- package/es/components/axis/band-scale.js.map +1 -0
- package/es/components/axis/get-axis-attributes.d.ts +136 -0
- package/es/components/axis/get-axis-attributes.js +166 -0
- package/es/components/axis/get-axis-attributes.js.map +1 -0
- package/es/components/axis/label-overlap.d.ts +3 -0
- package/es/components/axis/label-overlap.js +39 -0
- package/es/components/axis/label-overlap.js.map +1 -0
- package/es/components/axis/linear-scale.d.ts +45 -0
- package/es/components/axis/linear-scale.js +104 -0
- package/es/components/axis/linear-scale.js.map +1 -0
- package/es/components/legend/get-legend-attributes.d.ts +5 -0
- package/es/components/legend/get-legend-attributes.js +84 -0
- package/es/components/legend/get-legend-attributes.js.map +1 -0
- package/es/components/legend/legend.d.ts +23 -0
- package/es/components/legend/legend.js +93 -0
- package/es/components/legend/legend.js.map +1 -0
- package/{cjs → es/components}/menu/dom/BaseMenu.d.ts +2 -2
- package/es/components/menu/dom/BaseMenu.js.map +1 -0
- package/es/components/menu/dom/Menu.js.map +1 -0
- package/es/{menu → components/menu}/dom/MenuHandler.d.ts +2 -2
- package/es/{menu → components/menu}/dom/MenuHandler.js +2 -2
- package/es/components/menu/dom/MenuHandler.js.map +1 -0
- package/es/{menu → components/menu}/dom/logic/MenuContainer.d.ts +2 -2
- package/es/{menu → components/menu}/dom/logic/MenuContainer.js +4 -4
- package/es/components/menu/dom/logic/MenuContainer.js.map +1 -0
- package/es/{menu → components/menu}/dom/logic/MenuElement.d.ts +2 -2
- package/es/{menu → components/menu}/dom/logic/MenuElement.js +9 -9
- package/es/components/menu/dom/logic/MenuElement.js.map +1 -0
- package/es/components/menu/dom/logic/MenuElementStyle.js.map +1 -0
- package/es/components/title/title.d.ts +12 -0
- package/es/components/title/title.js +61 -0
- package/es/components/title/title.js.map +1 -0
- package/{cjs → es/components}/tooltip/BaseTooltip.d.ts +3 -3
- package/es/components/tooltip/BaseTooltip.js.map +1 -0
- package/es/components/tooltip/Tooltip.js.map +1 -0
- package/es/{tooltip → components/tooltip}/TooltipHandler.d.ts +4 -4
- package/es/{tooltip → components/tooltip}/TooltipHandler.js +4 -4
- package/es/components/tooltip/TooltipHandler.js.map +1 -0
- package/{cjs → es/components}/tooltip/logic/BubbleTooltipElement.d.ts +4 -4
- package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElement.js +4 -4
- package/es/components/tooltip/logic/BubbleTooltipElement.js.map +1 -0
- package/es/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -0
- package/es/components/util/orient.d.ts +3 -0
- package/es/components/util/orient.js +8 -0
- package/es/components/util/orient.js.map +1 -0
- package/es/components/util/register.d.ts +3 -0
- package/es/components/util/register.js +8 -0
- package/es/components/util/register.js.map +1 -0
- package/es/components/util/tick-data/config.d.ts +1 -0
- package/es/components/util/tick-data/config.js +2 -0
- package/es/components/util/tick-data/config.js.map +1 -0
- package/es/components/util/tick-data/continuous.d.ts +2 -0
- package/es/components/util/tick-data/continuous.js +38 -0
- package/es/components/util/tick-data/continuous.js.map +1 -0
- package/es/components/util/tick-data/discrete/linear.d.ts +2 -0
- package/es/components/util/tick-data/discrete/linear.js +59 -0
- package/es/components/util/tick-data/discrete/linear.js.map +1 -0
- package/es/components/util/tick-data/discrete/polar-angle.d.ts +2 -0
- package/es/components/util/tick-data/discrete/polar-angle.js +39 -0
- package/es/components/util/tick-data/discrete/polar-angle.js.map +1 -0
- package/es/components/util/tick-data/index.d.ts +2 -0
- package/es/components/util/tick-data/index.js +19 -0
- package/es/components/util/tick-data/index.js.map +1 -0
- package/es/components/util/tick-data/util.d.ts +21 -0
- package/es/components/util/tick-data/util.js +104 -0
- package/es/components/util/tick-data/util.js.map +1 -0
- package/es/components/util/transform.d.ts +5 -0
- package/es/components/util/transform.js +34 -0
- package/es/components/util/transform.js.map +1 -0
- package/es/core/BaseTable.d.ts +18 -5
- package/es/core/BaseTable.js +119 -43
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +5 -0
- package/es/core/TABLE_EVENT_TYPE.js +6 -1
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/es/core/style.js +1 -1
- package/es/core/style.js.map +1 -1
- package/es/core/tableHelper.js +1 -2
- package/es/data/CachedDataSource.js +2 -1
- package/es/data/DataSource.js +2 -2
- package/es/data/DataSource.js.map +1 -1
- package/es/dataset/dataset-pivot-table.d.ts +60 -0
- package/es/dataset/dataset-pivot-table.js +378 -0
- package/es/dataset/dataset-pivot-table.js.map +1 -0
- package/es/dataset/dataset.d.ts +15 -19
- package/es/dataset/dataset.js +183 -190
- package/es/dataset/dataset.js.map +1 -1
- package/es/dataset/statistics-helper.d.ts +67 -0
- package/es/dataset/statistics-helper.js +152 -0
- package/es/dataset/statistics-helper.js.map +1 -0
- package/es/dataset/util/zero-align.d.ts +10 -0
- package/es/dataset/util/zero-align.js +111 -0
- package/es/dataset/util/zero-align.js.map +1 -0
- package/es/event/EventHandler.js.map +1 -1
- package/es/event/EventTarget.d.ts +5 -5
- package/es/event/EventTarget.js +2 -2
- package/es/event/EventTarget.js.map +1 -1
- package/es/event/VChartEventProxy.d.ts +1 -0
- package/es/event/VChartEventProxy.js +1 -0
- package/es/event/VChartEventProxy.js.map +1 -0
- package/es/event/event.js +10 -3
- package/es/event/event.js.map +1 -1
- package/es/event/listener/table-group.js +8 -6
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/pivot-chart/axis-click.d.ts +2 -0
- package/es/event/pivot-chart/axis-click.js +36 -0
- package/es/event/pivot-chart/axis-click.js.map +1 -0
- package/es/event/pivot-chart/axis-hover.d.ts +2 -0
- package/es/event/pivot-chart/axis-hover.js +33 -0
- package/es/event/pivot-chart/axis-hover.js.map +1 -0
- package/es/event/scroll.js +4 -3
- package/es/event/scroll.js.map +1 -1
- package/es/event/sparkline-event.js +1 -2
- package/es/event/sparkline-event.js.map +1 -1
- package/es/header-helper/header-helper.js +1 -1
- package/es/header-helper/header-helper.js.map +1 -1
- package/es/header-helper/style/MultilineTextHeaderStyle.js +2 -2
- package/es/header-helper/style/MultilineTextHeaderStyle.js.map +1 -1
- package/es/header-helper/style/Style.d.ts +0 -1
- package/es/header-helper/style/Style.js +25 -28
- package/es/header-helper/style/Style.js.map +1 -1
- package/es/index.d.ts +4 -3
- package/es/index.js +4 -2
- package/es/index.js.map +1 -1
- package/es/layout/chart-helper/get-axis-config.d.ts +2 -0
- package/es/layout/chart-helper/get-axis-config.js +120 -0
- package/es/layout/chart-helper/get-axis-config.js.map +1 -0
- package/es/layout/chart-helper/get-chart-spec.d.ts +7 -0
- package/es/layout/chart-helper/get-chart-spec.js +132 -0
- package/es/layout/chart-helper/get-chart-spec.js.map +1 -0
- package/es/layout/index.js +2 -1
- package/es/layout/pivot-header-layout.d.ts +13 -5
- package/es/layout/pivot-header-layout.js +50 -12
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/pivot-layout.d.ts +55 -8
- package/es/layout/pivot-layout.js +409 -90
- package/es/layout/pivot-layout.js.map +1 -1
- package/es/layout/simple-header-layout.d.ts +10 -0
- package/es/layout/simple-header-layout.js +44 -1
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/plugins/chartModules.js +2 -0
- package/es/plugins/chartModules.js.map +1 -0
- package/es/register.d.ts +1 -1
- package/es/register.js +3 -3
- package/es/register.js.map +1 -1
- package/es/render/layout/text.d.ts +33 -4
- package/es/render/layout/text.js +9 -3
- package/es/render/layout/text.js.map +1 -1
- package/es/scenegraph/component/custom.js +17 -16
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/component/menu.d.ts +41 -0
- package/es/scenegraph/component/table-component.js +3 -3
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/graphic/chart.d.ts +4 -1
- package/es/scenegraph/graphic/chart.js +29 -15
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js +22 -3
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.d.ts +9 -9
- package/es/scenegraph/graphic/contributions/group-contribution-render.js +48 -29
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/image-contribution-render.d.ts +3 -3
- package/es/scenegraph/graphic/contributions/image-contribution-render.js +2 -2
- package/es/scenegraph/graphic/contributions/image-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/rect-contribution-render.d.ts +3 -3
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js +2 -2
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/text.d.ts +15 -0
- package/es/scenegraph/group-creater/cell-helper.js +10 -2
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +6 -5
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +1 -1
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/group-creater/column.js.map +1 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +3 -0
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +65 -0
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -0
- package/es/scenegraph/group-creater/progress/proxy.d.ts +2 -2
- package/es/scenegraph/group-creater/progress/proxy.js +42 -55
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.d.ts +1 -0
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +59 -23
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.d.ts +1 -0
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +94 -37
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +23 -15
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +20 -9
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/move-cell.js +1 -1
- package/es/scenegraph/layout/move-cell.js.map +1 -1
- package/es/scenegraph/layout/update-cell.js +3 -1
- package/es/scenegraph/layout/update-cell.js.map +1 -1
- package/es/scenegraph/layout/update-height.js +1 -1
- package/es/scenegraph/layout/update-height.js.map +1 -1
- package/es/scenegraph/layout/update-row.js +1 -1
- package/es/scenegraph/layout/update-row.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +35 -2
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.d.ts +3 -0
- package/es/scenegraph/refresh-node/update-chart.js +70 -4
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +8 -0
- package/es/scenegraph/scenegraph.js +120 -21
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/stick-text/index.js +10 -8
- package/es/scenegraph/stick-text/index.js.map +1 -1
- package/es/scenegraph/style/corner-cell.d.ts +3 -0
- package/es/scenegraph/style/corner-cell.js +25 -0
- package/es/scenegraph/style/corner-cell.js.map +1 -0
- package/es/scenegraph/style/frame-border.d.ts +1 -0
- package/es/scenegraph/style/frame-border.js +2 -6
- package/es/scenegraph/style/frame-border.js.map +1 -1
- package/es/scenegraph/utils/get-cell-merge.js +2 -1
- package/es/scenegraph/utils/get-cell-merge.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.js +1 -1
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/state/state.js +1 -1
- package/es/state/state.js.map +1 -1
- package/es/themes/DARK.js +1 -2
- package/es/themes/theme.d.ts +10 -0
- package/es/themes/theme.js +50 -4
- package/es/themes/theme.js.map +1 -1
- package/es/tools/LimitPromiseQueue.js +2 -1
- package/es/tools/calc.d.ts +3 -0
- package/es/tools/calc.js +10 -0
- package/es/tools/calc.js.map +1 -1
- package/es/tools/debounce.js +1 -1
- package/es/tools/diff-cell.js +1 -1
- package/es/tools/dom.js +1 -1
- package/es/tools/env.js +1 -1
- package/es/ts-types/base-table.d.ts +29 -12
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/column/style.d.ts +0 -1
- package/es/ts-types/column/style.js.map +1 -1
- package/es/ts-types/component/axis.d.ts +12 -0
- package/es/ts-types/component/axis.js +2 -0
- package/es/ts-types/component/axis.js.map +1 -0
- package/es/ts-types/component/legend.d.ts +5 -0
- package/es/ts-types/component/legend.js +2 -0
- package/es/ts-types/component/legend.js.map +1 -0
- package/es/ts-types/component/title.d.ts +47 -0
- package/es/ts-types/component/title.js +2 -0
- package/es/ts-types/component/title.js.map +1 -0
- package/es/ts-types/component/util.d.ts +1 -0
- package/es/ts-types/component/util.js +2 -0
- package/es/ts-types/component/util.js.map +1 -0
- package/es/ts-types/customElement.d.ts +2 -0
- package/es/ts-types/customElement.js.map +1 -1
- package/es/ts-types/events.d.ts +108 -83
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/list-table/define/basic-define.js.map +1 -1
- package/es/ts-types/list-table/define/chart-define.d.ts +1 -1
- package/es/ts-types/list-table/define/chart-define.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.d.ts +4 -2
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/new-data-set.d.ts +21 -7
- package/es/ts-types/new-data-set.js +2 -2
- package/es/ts-types/new-data-set.js.map +1 -1
- package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.d.ts +4 -0
- package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +4 -0
- package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -1
- package/es/ts-types/pivot-table/corner.d.ts +3 -3
- package/es/ts-types/pivot-table/corner.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/chart-indicator.d.ts +1 -1
- package/es/ts-types/pivot-table/indicator/chart-indicator.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/index.d.ts +1 -0
- package/es/ts-types/pivot-table/indicator/index.js.map +1 -1
- package/es/ts-types/pivot-table/title.d.ts +1 -1
- package/es/ts-types/pivot-table/title.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +27 -3
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/ts-types/theme.d.ts +5 -0
- package/es/ts-types/theme.js.map +1 -1
- package/package.json +14 -8
- package/cjs/chartType.js +0 -14
- package/cjs/chartType.js.map +0 -1
- package/cjs/menu/dom/BaseMenu.js.map +0 -1
- package/cjs/menu/dom/Menu.js.map +0 -1
- package/cjs/menu/dom/MenuHandler.js.map +0 -1
- package/cjs/menu/dom/logic/MenuContainer.js.map +0 -1
- package/cjs/menu/dom/logic/MenuElement.js.map +0 -1
- package/cjs/menu/dom/logic/MenuElementStyle.js.map +0 -1
- package/cjs/plugins/chartTypes.js.map +0 -1
- package/cjs/scenegraph/layout/auto-width.d.ts +0 -2
- package/cjs/scenegraph/layout/auto-width.js +0 -85
- package/cjs/scenegraph/layout/auto-width.js.map +0 -1
- package/cjs/tooltip/BaseTooltip.js.map +0 -1
- package/cjs/tooltip/Tooltip.js.map +0 -1
- package/cjs/tooltip/TooltipHandler.js.map +0 -1
- package/cjs/tooltip/logic/BubbleTooltipElement.js.map +0 -1
- package/cjs/tooltip/logic/BubbleTooltipElementStyle.js.map +0 -1
- package/es/chartType.js.map +0 -1
- package/es/menu/dom/BaseMenu.js.map +0 -1
- package/es/menu/dom/Menu.js.map +0 -1
- package/es/menu/dom/MenuHandler.js.map +0 -1
- package/es/menu/dom/logic/MenuContainer.js.map +0 -1
- package/es/menu/dom/logic/MenuElement.js.map +0 -1
- package/es/menu/dom/logic/MenuElementStyle.js.map +0 -1
- package/es/plugins/chartTypes.js +0 -2
- package/es/plugins/chartTypes.js.map +0 -1
- package/es/scenegraph/layout/auto-width.d.ts +0 -2
- package/es/scenegraph/layout/auto-width.js +0 -82
- package/es/scenegraph/layout/auto-width.js.map +0 -1
- package/es/tooltip/BaseTooltip.js.map +0 -1
- package/es/tooltip/Tooltip.js.map +0 -1
- package/es/tooltip/TooltipHandler.js.map +0 -1
- package/es/tooltip/logic/BubbleTooltipElement.js.map +0 -1
- package/es/tooltip/logic/BubbleTooltipElementStyle.js.map +0 -1
- /package/cjs/{chartType.d.ts → chartModule.d.ts} +0 -0
- /package/cjs/{menu → components/menu}/dom/BaseMenu.js +0 -0
- /package/cjs/{menu → components/menu}/dom/Menu.d.ts +0 -0
- /package/cjs/{menu → components/menu}/dom/Menu.js +0 -0
- /package/cjs/{menu → components/menu}/dom/logic/MenuElementStyle.d.ts +0 -0
- /package/cjs/{menu → components/menu}/dom/logic/MenuElementStyle.js +0 -0
- /package/cjs/{tooltip → components/tooltip}/BaseTooltip.js +0 -0
- /package/cjs/{tooltip → components/tooltip}/Tooltip.d.ts +0 -0
- /package/cjs/{tooltip → components/tooltip}/Tooltip.js +0 -0
- /package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.d.ts +0 -0
- /package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.js +0 -0
- /package/cjs/plugins/{chartTypes.d.ts → chartModules.d.ts} +0 -0
- /package/es/{chartType.d.ts → chartModule.d.ts} +0 -0
- /package/es/{menu → components/menu}/dom/BaseMenu.js +0 -0
- /package/es/{menu → components/menu}/dom/Menu.d.ts +0 -0
- /package/es/{menu → components/menu}/dom/Menu.js +0 -0
- /package/es/{menu → components/menu}/dom/logic/MenuElementStyle.d.ts +0 -0
- /package/es/{menu → components/menu}/dom/logic/MenuElementStyle.js +0 -0
- /package/es/{tooltip → components/tooltip}/BaseTooltip.js +0 -0
- /package/es/{tooltip → components/tooltip}/Tooltip.d.ts +0 -0
- /package/es/{tooltip → components/tooltip}/Tooltip.js +0 -0
- /package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.d.ts +0 -0
- /package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.js +0 -0
- /package/es/plugins/{chartTypes.d.ts → chartModules.d.ts} +0 -0
|
@@ -49,155 +49,152 @@ class Style extends EventTarget_1.EventTarget {
|
|
|
49
49
|
return this._bgColor;
|
|
50
50
|
}
|
|
51
51
|
set bgColor(bgColor) {
|
|
52
|
-
this._bgColor = bgColor
|
|
52
|
+
this._bgColor = bgColor;
|
|
53
53
|
}
|
|
54
54
|
get color() {
|
|
55
55
|
return this._color;
|
|
56
56
|
}
|
|
57
57
|
set color(color) {
|
|
58
|
-
this._color = color
|
|
58
|
+
this._color = color;
|
|
59
59
|
}
|
|
60
60
|
get fontSize() {
|
|
61
61
|
return this._fontSize;
|
|
62
62
|
}
|
|
63
63
|
set fontSize(fontSize) {
|
|
64
|
-
this._fontSize = fontSize
|
|
64
|
+
this._fontSize = fontSize;
|
|
65
65
|
}
|
|
66
66
|
get fontFamily() {
|
|
67
67
|
return this._fontFamily;
|
|
68
68
|
}
|
|
69
69
|
set fontFamily(fontFamily) {
|
|
70
|
-
this._fontFamily = fontFamily
|
|
70
|
+
this._fontFamily = fontFamily;
|
|
71
71
|
}
|
|
72
72
|
get fontWeight() {
|
|
73
73
|
return this._fontWeight;
|
|
74
74
|
}
|
|
75
75
|
set fontWeight(fontWeight) {
|
|
76
|
-
this._fontWeight = fontWeight
|
|
76
|
+
this._fontWeight = fontWeight;
|
|
77
77
|
}
|
|
78
78
|
get fontVariant() {
|
|
79
79
|
return this._fontVariant;
|
|
80
80
|
}
|
|
81
81
|
set fontVariant(fontVariant) {
|
|
82
|
-
this._fontVariant = fontVariant
|
|
82
|
+
this._fontVariant = fontVariant;
|
|
83
83
|
}
|
|
84
84
|
get fontStyle() {
|
|
85
85
|
return this._fontStyle;
|
|
86
86
|
}
|
|
87
87
|
set fontStyle(fontStyle) {
|
|
88
|
-
this._fontStyle = fontStyle
|
|
88
|
+
this._fontStyle = fontStyle;
|
|
89
89
|
}
|
|
90
90
|
get textOverflow() {
|
|
91
91
|
return this._textOverflow;
|
|
92
92
|
}
|
|
93
93
|
set textOverflow(textOverflow) {
|
|
94
|
-
this._textOverflow = textOverflow
|
|
94
|
+
this._textOverflow = textOverflow;
|
|
95
95
|
}
|
|
96
96
|
get padding() {
|
|
97
97
|
var _a;
|
|
98
98
|
return null !== (_a = this._padding) && void 0 !== _a ? _a : this._defaultPadding;
|
|
99
99
|
}
|
|
100
100
|
set padding(padding) {
|
|
101
|
-
this._padding = padding
|
|
101
|
+
this._padding = padding;
|
|
102
102
|
}
|
|
103
103
|
get borderColor() {
|
|
104
104
|
return this._borderColor;
|
|
105
105
|
}
|
|
106
106
|
set borderColor(borderColor) {
|
|
107
|
-
this._borderColor = borderColor
|
|
107
|
+
this._borderColor = borderColor;
|
|
108
108
|
}
|
|
109
109
|
get textStick() {
|
|
110
110
|
return this._textStick;
|
|
111
111
|
}
|
|
112
112
|
set textStick(textStick) {
|
|
113
|
-
this._textStick = textStick
|
|
113
|
+
this._textStick = textStick;
|
|
114
114
|
}
|
|
115
115
|
get marked() {
|
|
116
116
|
return this._marked;
|
|
117
117
|
}
|
|
118
118
|
set marked(marked) {
|
|
119
|
-
this._marked = marked
|
|
119
|
+
this._marked = marked;
|
|
120
120
|
}
|
|
121
121
|
get textAlign() {
|
|
122
122
|
return this._textAlign;
|
|
123
123
|
}
|
|
124
124
|
set textAlign(textAlign) {
|
|
125
|
-
this._textAlign = textAlign
|
|
125
|
+
this._textAlign = textAlign;
|
|
126
126
|
}
|
|
127
127
|
get textBaseline() {
|
|
128
128
|
return this._textBaseline;
|
|
129
129
|
}
|
|
130
130
|
set textBaseline(textBaseline) {
|
|
131
|
-
this._textBaseline = textBaseline
|
|
131
|
+
this._textBaseline = textBaseline;
|
|
132
132
|
}
|
|
133
133
|
get lineHeight() {
|
|
134
134
|
return this._lineHeight;
|
|
135
135
|
}
|
|
136
136
|
set lineHeight(lineHeight) {
|
|
137
|
-
this._lineHeight = lineHeight
|
|
137
|
+
this._lineHeight = lineHeight;
|
|
138
138
|
}
|
|
139
139
|
get underline() {
|
|
140
140
|
return this._underline;
|
|
141
141
|
}
|
|
142
142
|
set underline(underline) {
|
|
143
|
-
this._underline = underline
|
|
143
|
+
this._underline = underline;
|
|
144
144
|
}
|
|
145
145
|
get underlineColor() {
|
|
146
146
|
return this._underlineColor;
|
|
147
147
|
}
|
|
148
148
|
set underlineColor(underlineColor) {
|
|
149
|
-
this._underlineColor = underlineColor
|
|
149
|
+
this._underlineColor = underlineColor;
|
|
150
150
|
}
|
|
151
151
|
get underlineDash() {
|
|
152
152
|
return this._underlineDash;
|
|
153
153
|
}
|
|
154
154
|
set underlineDash(underlineDash) {
|
|
155
|
-
this._underlineDash = underlineDash
|
|
155
|
+
this._underlineDash = underlineDash;
|
|
156
156
|
}
|
|
157
157
|
get lineThrough() {
|
|
158
158
|
return this._lineThrough;
|
|
159
159
|
}
|
|
160
160
|
set lineThrough(lineThrough) {
|
|
161
|
-
this._lineThrough = lineThrough
|
|
161
|
+
this._lineThrough = lineThrough;
|
|
162
162
|
}
|
|
163
163
|
get lineThroughColor() {
|
|
164
164
|
return this._lineThroughColor;
|
|
165
165
|
}
|
|
166
166
|
set lineThroughColor(lineThroughColor) {
|
|
167
|
-
this._lineThroughColor = lineThroughColor
|
|
167
|
+
this._lineThroughColor = lineThroughColor;
|
|
168
168
|
}
|
|
169
169
|
get lineThroughDash() {
|
|
170
170
|
return this._lineThroughDash;
|
|
171
171
|
}
|
|
172
172
|
set lineThroughDash(lineThroughDash) {
|
|
173
|
-
this._lineThroughDash = lineThroughDash
|
|
173
|
+
this._lineThroughDash = lineThroughDash;
|
|
174
174
|
}
|
|
175
175
|
get linkColor() {
|
|
176
176
|
return this._linkColor;
|
|
177
177
|
}
|
|
178
178
|
set linkColor(linkColor) {
|
|
179
|
-
this._linkColor = linkColor
|
|
179
|
+
this._linkColor = linkColor;
|
|
180
180
|
}
|
|
181
181
|
get cursor() {
|
|
182
182
|
return this._cursor;
|
|
183
183
|
}
|
|
184
184
|
set cursor(cursor) {
|
|
185
|
-
this._cursor = cursor
|
|
185
|
+
this._cursor = cursor;
|
|
186
186
|
}
|
|
187
187
|
get borderLineWidth() {
|
|
188
188
|
return this._borderLineWidth;
|
|
189
189
|
}
|
|
190
190
|
set borderLineWidth(borderLineWidth) {
|
|
191
|
-
this._borderLineWidth = borderLineWidth
|
|
191
|
+
this._borderLineWidth = borderLineWidth;
|
|
192
192
|
}
|
|
193
193
|
get borderLineDash() {
|
|
194
194
|
return this._borderLineDash;
|
|
195
195
|
}
|
|
196
196
|
set borderLineDash(borderLineDash) {
|
|
197
|
-
this._borderLineDash = borderLineDash
|
|
198
|
-
}
|
|
199
|
-
doChangeStyle() {
|
|
200
|
-
this.fireListeners(EVENT_TYPE.CHANGE_STYLE);
|
|
197
|
+
this._borderLineDash = borderLineDash;
|
|
201
198
|
}
|
|
202
199
|
clone() {
|
|
203
200
|
return new Style(this);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["header-helper/style/Style.ts"],"names":[],"mappings":";;;AAoBA,IAAI,YAAmB,CAAC;AACxB,yDAAsD;AAEtD,MAAM,UAAU,GAAG;IACjB,YAAY,EAAE,cAAc;CAC7B,CAAC;AACF,MAAa,KAAM,SAAQ,yBAAW;IAoCpC,MAAM,KAAK,UAAU;QACnB,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,MAAM,KAAK,OAAO;QAChB,OAAO,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC;IACpE,CAAC;IACD,YAAY,QAAsB,EAAE,EAAE,cAA4B,EAAE;;QAClE,KAAK,EAAE,CAAC;QAlCF,oBAAe,GAA2B,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;Q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D;QACvE,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;QACxC,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IACD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IACD,IAAI,cAAc,CAAC,cAAmD;QACpE,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;QACtC,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IACD,aAAa;QACX,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAC9C,CAAC;IACD,KAAK;QACH,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;CACF;AA1SD,sBA0SC","file":"Style.js","sourcesContent":["import type {\n ColorPropertyDefine,\n ColorsPropertyDefine,\n ColumnStyle,\n IStyleOption,\n TextOverflow,\n UnderlinePropertyDefine,\n LineThroughPropertyDefine,\n LineDashPropertyDefine,\n PaddingsPropertyDefine,\n CursorPropertyDefine,\n LineWidthsPropertyDefine,\n LineDashsPropertyDefine,\n MarkedPropertyDefine,\n FontSizePropertyDefine,\n FontFamilyPropertyDefine,\n FontWeightPropertyDefine,\n FontVariantPropertyDefine,\n FontStylePropertyDefine\n} from '../../ts-types';\nlet defaultStyle: Style;\nimport { EventTarget } from '../../event/EventTarget';\nimport type { TextAlignType, TextBaselineType } from '@visactor/vrender';\nconst EVENT_TYPE = {\n CHANGE_STYLE: 'change_style'\n};\nexport class Style extends EventTarget implements ColumnStyle {\n private _color?: ColorPropertyDefine;\n private _fontSize?: FontSizePropertyDefine;\n private _fontFamily?: FontFamilyPropertyDefine;\n private _fontWeight?: FontWeightPropertyDefine;\n private _fontVariant?: FontVariantPropertyDefine;\n private _fontStyle?: FontStylePropertyDefine;\n private _textOverflow: TextOverflow;\n private _padding: PaddingsPropertyDefine | undefined;\n private _defaultPadding: PaddingsPropertyDefine = [10, 16, 10, 16];\n private _textStick: boolean;\n private _marked: MarkedPropertyDefine;\n // eslint-disable-next-line no-undef\n private _textAlign: TextAlignType;\n // eslint-disable-next-line no-undef\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 _lineThrough?: LineThroughPropertyDefine;\n private _lineThroughColor?: ColorPropertyDefine;\n private _lineThroughDash?: LineDashPropertyDefine;\n private _linkColor?: ColorPropertyDefine;\n\n // private _tag?: TagPropertyDefine;\n // private _tagFont?: FontPropertyDefine;\n // private _tagColor?: ColorPropertyDefine;\n // private _tagBgColor?: ColorPropertyDefine;\n // private _tagMargin?: number | string | (number | string)[];\n\n private _cursor?: CursorPropertyDefine;\n private _borderLineWidth?: LineWidthsPropertyDefine;\n private _borderLineDash?: LineDashsPropertyDefine;\n static get EVENT_TYPE(): { CHANGE_STYLE: string } {\n return EVENT_TYPE;\n }\n static get DEFAULT(): Style {\n return defaultStyle ? defaultStyle : (defaultStyle = new Style());\n }\n constructor(style: IStyleOption = {}, headerStyle: IStyleOption = {}) {\n super();\n this._color = style.color ?? headerStyle?.color;\n // icon为文字前后可添加的图标\n // this._icon = style.icon;\n this._fontSize = style.fontSize ?? headerStyle?.fontSize;\n this._fontFamily = style.fontFamily ?? headerStyle?.fontFamily;\n this._fontWeight = style.fontWeight ?? headerStyle?.fontWeight;\n this._fontVariant = style.fontVariant ?? headerStyle?.fontVariant;\n this._fontStyle = style.fontStyle ?? headerStyle?.fontStyle;\n this._textOverflow = (style.textOverflow ?? headerStyle?.textOverflow) || 'ellipsis';\n this._textStick = style.textStick ?? headerStyle?.textStick ?? false;\n this._marked = style.marked ?? headerStyle?.marked ?? false;\n this._textAlign = (style.textAlign ?? headerStyle?.textAlign) || 'left';\n this._textBaseline = (style.textBaseline ?? headerStyle?.textBaseline) || 'middle';\n this._bgColor = style.bgColor ?? headerStyle?.bgColor;\n this._padding = style.padding ?? headerStyle?.padding ?? this._defaultPadding;\n this._borderColor = style.borderColor ?? headerStyle?.borderColor;\n this._lineHeight = style.lineHeight ?? headerStyle?.lineHeight;\n this._underline = style.underline ?? headerStyle?.underline;\n this._underlineColor = style.underlineColor ?? headerStyle?.underlineColor;\n this._underlineDash = style.underlineDash ?? headerStyle?.underlineDash;\n this._lineThrough = style.lineThrough ?? headerStyle?.lineThrough;\n this._lineThroughColor = style.lineThroughColor ?? headerStyle?.lineThroughColor;\n this._lineThroughDash = style.lineThroughDash ?? headerStyle?.lineThroughDash;\n this._linkColor = style.linkColor ?? headerStyle?.linkColor;\n\n // this._tag = style.tag ?? headerStyle?.tag;\n // this._tagFont = style.tagFont ?? headerStyle?.tagFont;\n // this._tagColor = style.tagColor ?? headerStyle?.tagColor;\n // this._tagBgColor = style.tagBgColor ?? headerStyle?.tagBgColor;\n // this._tagMargin = style.tagMargin ?? headerStyle?.tagMargin;\n this._cursor = style.cursor ?? headerStyle?.cursor;\n this._borderLineWidth = style.borderLineWidth ?? headerStyle?.borderLineWidth;\n this._borderLineDash = style.borderLineDash ?? headerStyle?.borderLineDash;\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 color(): ColorPropertyDefine | undefined {\n return this._color;\n }\n set color(color: ColorPropertyDefine | undefined) {\n this._color = color;\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 textOverflow(): TextOverflow {\n return this._textOverflow;\n }\n set textOverflow(textOverflow: TextOverflow) {\n this._textOverflow = textOverflow;\n this.doChangeStyle();\n }\n get padding(): PaddingsPropertyDefine | undefined {\n return this._padding ?? this._defaultPadding;\n }\n set padding(padding: PaddingsPropertyDefine | undefined) {\n this._padding = padding;\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 marked(): MarkedPropertyDefine | undefined {\n return this._marked;\n }\n set marked(marked: MarkedPropertyDefine | undefined) {\n this._marked = marked;\n this.doChangeStyle();\n }\n // eslint-disable-next-line no-undef\n get textAlign(): TextAlignType {\n return this._textAlign;\n }\n // eslint-disable-next-line no-undef\n set textAlign(textAlign: TextAlignType) {\n this._textAlign = textAlign;\n this.doChangeStyle();\n }\n // eslint-disable-next-line no-undef\n get textBaseline(): TextBaselineType {\n return this._textBaseline;\n }\n // eslint-disable-next-line no-undef\n set textBaseline(textBaseline: TextBaselineType) {\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 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 tag(): TagPropertyDefine | undefined {\n // return this._tag;\n // }\n // set tag(tag: TagPropertyDefine | undefined) {\n // this._tag = tag;\n // this.doChangeStyle();\n // }\n // get tagFont(): FontPropertyDefine | undefined {\n // return this._tagFont;\n // }\n // set tagFont(tagFont: FontPropertyDefine | undefined) {\n // this._tagFont = tagFont;\n // this.doChangeStyle();\n // }\n // get tagColor(): ColorPropertyDefine | undefined {\n // return this._tagColor;\n // }\n // set tagColor(tagColor: ColorPropertyDefine | undefined) {\n // this._tagColor = tagColor;\n // this.doChangeStyle();\n // }\n // get tagBgColor(): ColorPropertyDefine | undefined {\n // return this._tagBgColor;\n // }\n // set tagBgColor(tagBgColor: ColorPropertyDefine | undefined) {\n // this._tagBgColor = tagBgColor;\n // this.doChangeStyle();\n // }\n // get tagMargin(): number | string | (number | string)[] | undefined {\n // return this._tagMargin;\n // }\n // set tagMargin(tagMargin: number | string | (number | string)[] | undefined) {\n // this._tagMargin = tagMargin;\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 doChangeStyle(): void {\n this.fireListeners(EVENT_TYPE.CHANGE_STYLE);\n }\n clone(): Style {\n return new Style(this);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["header-helper/style/Style.ts"],"names":[],"mappings":";;;AAoBA,IAAI,YAAmB,CAAC;AACxB,yDAAsD;AAEtD,MAAM,UAAU,GAAG;IACjB,YAAY,EAAE,cAAc;CAC7B,CAAC;AACF,MAAa,KAAM,SAAQ,yBAAW;IAoCpC,MAAM,KAAK,UAAU;QACnB,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,MAAM,KAAK,OAAO;QAChB,OAAO,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC;IACpE,CAAC;IACD,YAAY,QAAsB,EAAE,EAAE,cAA4B,EAAE;;QAClE,KAAK,EAAE,CAAC;QAlCF,oBAAe,GAA2B,CAAC,EAAE,EAAE,EAAE,EAAE,EA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AC,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;IAoCD,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;IAID,KAAK;QACH,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;CACF;AA1SD,sBA0SC","file":"Style.js","sourcesContent":["import type {\n ColorPropertyDefine,\n ColorsPropertyDefine,\n ColumnStyle,\n IStyleOption,\n TextOverflow,\n UnderlinePropertyDefine,\n LineThroughPropertyDefine,\n LineDashPropertyDefine,\n PaddingsPropertyDefine,\n CursorPropertyDefine,\n LineWidthsPropertyDefine,\n LineDashsPropertyDefine,\n MarkedPropertyDefine,\n FontSizePropertyDefine,\n FontFamilyPropertyDefine,\n FontWeightPropertyDefine,\n FontVariantPropertyDefine,\n FontStylePropertyDefine\n} from '../../ts-types';\nlet defaultStyle: Style;\nimport { EventTarget } from '../../event/EventTarget';\nimport type { TextAlignType, TextBaselineType } from '@visactor/vrender';\nconst EVENT_TYPE = {\n CHANGE_STYLE: 'change_style'\n};\nexport class Style extends EventTarget implements ColumnStyle {\n private _color?: ColorPropertyDefine;\n private _fontSize?: FontSizePropertyDefine;\n private _fontFamily?: FontFamilyPropertyDefine;\n private _fontWeight?: FontWeightPropertyDefine;\n private _fontVariant?: FontVariantPropertyDefine;\n private _fontStyle?: FontStylePropertyDefine;\n private _textOverflow: TextOverflow;\n private _padding: PaddingsPropertyDefine | undefined;\n private _defaultPadding: PaddingsPropertyDefine = [10, 16, 10, 16];\n private _textStick: boolean;\n private _marked: MarkedPropertyDefine;\n // eslint-disable-next-line no-undef\n private _textAlign: TextAlignType;\n // eslint-disable-next-line no-undef\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 _lineThrough?: LineThroughPropertyDefine;\n private _lineThroughColor?: ColorPropertyDefine;\n private _lineThroughDash?: LineDashPropertyDefine;\n private _linkColor?: ColorPropertyDefine;\n\n // private _tag?: TagPropertyDefine;\n // private _tagFont?: FontPropertyDefine;\n // private _tagColor?: ColorPropertyDefine;\n // private _tagBgColor?: ColorPropertyDefine;\n // private _tagMargin?: number | string | (number | string)[];\n\n private _cursor?: CursorPropertyDefine;\n private _borderLineWidth?: LineWidthsPropertyDefine;\n private _borderLineDash?: LineDashsPropertyDefine;\n static get EVENT_TYPE(): { CHANGE_STYLE: string } {\n return EVENT_TYPE;\n }\n static get DEFAULT(): Style {\n return defaultStyle ? defaultStyle : (defaultStyle = new Style());\n }\n constructor(style: IStyleOption = {}, headerStyle: IStyleOption = {}) {\n super();\n this._color = style.color ?? headerStyle?.color;\n // icon为文字前后可添加的图标\n // this._icon = style.icon;\n this._fontSize = style.fontSize ?? headerStyle?.fontSize;\n this._fontFamily = style.fontFamily ?? headerStyle?.fontFamily;\n this._fontWeight = style.fontWeight ?? headerStyle?.fontWeight;\n this._fontVariant = style.fontVariant ?? headerStyle?.fontVariant;\n this._fontStyle = style.fontStyle ?? headerStyle?.fontStyle;\n this._textOverflow = (style.textOverflow ?? headerStyle?.textOverflow) || 'ellipsis';\n this._textStick = style.textStick ?? headerStyle?.textStick ?? false;\n this._marked = style.marked ?? headerStyle?.marked ?? false;\n this._textAlign = (style.textAlign ?? headerStyle?.textAlign) || 'left';\n this._textBaseline = (style.textBaseline ?? headerStyle?.textBaseline) || 'middle';\n this._bgColor = style.bgColor ?? headerStyle?.bgColor;\n this._padding = style.padding ?? headerStyle?.padding ?? this._defaultPadding;\n this._borderColor = style.borderColor ?? headerStyle?.borderColor;\n this._lineHeight = style.lineHeight ?? headerStyle?.lineHeight;\n this._underline = style.underline ?? headerStyle?.underline;\n this._underlineColor = style.underlineColor ?? headerStyle?.underlineColor;\n this._underlineDash = style.underlineDash ?? headerStyle?.underlineDash;\n this._lineThrough = style.lineThrough ?? headerStyle?.lineThrough;\n this._lineThroughColor = style.lineThroughColor ?? headerStyle?.lineThroughColor;\n this._lineThroughDash = style.lineThroughDash ?? headerStyle?.lineThroughDash;\n this._linkColor = style.linkColor ?? headerStyle?.linkColor;\n\n // this._tag = style.tag ?? headerStyle?.tag;\n // this._tagFont = style.tagFont ?? headerStyle?.tagFont;\n // this._tagColor = style.tagColor ?? headerStyle?.tagColor;\n // this._tagBgColor = style.tagBgColor ?? headerStyle?.tagBgColor;\n // this._tagMargin = style.tagMargin ?? headerStyle?.tagMargin;\n this._cursor = style.cursor ?? headerStyle?.cursor;\n this._borderLineWidth = style.borderLineWidth ?? headerStyle?.borderLineWidth;\n this._borderLineDash = style.borderLineDash ?? headerStyle?.borderLineDash;\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 color(): ColorPropertyDefine | undefined {\n return this._color;\n }\n set color(color: ColorPropertyDefine | undefined) {\n this._color = color;\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 textOverflow(): TextOverflow {\n return this._textOverflow;\n }\n set textOverflow(textOverflow: TextOverflow) {\n this._textOverflow = textOverflow;\n //this.doChangeStyle();\n }\n get padding(): PaddingsPropertyDefine | undefined {\n return this._padding ?? this._defaultPadding;\n }\n set padding(padding: PaddingsPropertyDefine | undefined) {\n this._padding = padding;\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 marked(): MarkedPropertyDefine | undefined {\n return this._marked;\n }\n set marked(marked: MarkedPropertyDefine | undefined) {\n this._marked = marked;\n //this.doChangeStyle();\n }\n // eslint-disable-next-line no-undef\n get textAlign(): TextAlignType {\n return this._textAlign;\n }\n // eslint-disable-next-line no-undef\n set textAlign(textAlign: TextAlignType) {\n this._textAlign = textAlign;\n //this.doChangeStyle();\n }\n // eslint-disable-next-line no-undef\n get textBaseline(): TextBaselineType {\n return this._textBaseline;\n }\n // eslint-disable-next-line no-undef\n set textBaseline(textBaseline: TextBaselineType) {\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 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 tag(): TagPropertyDefine | undefined {\n // return this._tag;\n // }\n // set tag(tag: TagPropertyDefine | undefined) {\n // this._tag = tag;\n // //this.doChangeStyle();\n // }\n // get tagFont(): FontPropertyDefine | undefined {\n // return this._tagFont;\n // }\n // set tagFont(tagFont: FontPropertyDefine | undefined) {\n // this._tagFont = tagFont;\n // //this.doChangeStyle();\n // }\n // get tagColor(): ColorPropertyDefine | undefined {\n // return this._tagColor;\n // }\n // set tagColor(tagColor: ColorPropertyDefine | undefined) {\n // this._tagColor = tagColor;\n // //this.doChangeStyle();\n // }\n // get tagBgColor(): ColorPropertyDefine | undefined {\n // return this._tagBgColor;\n // }\n // set tagBgColor(tagBgColor: ColorPropertyDefine | undefined) {\n // this._tagBgColor = tagBgColor;\n // //this.doChangeStyle();\n // }\n // get tagMargin(): number | string | (number | string)[] | undefined {\n // return this._tagMargin;\n // }\n // set tagMargin(tagMargin: number | string | (number | string)[] | undefined) {\n // this._tagMargin = tagMargin;\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 // doChangeStyle(): void {\n // this.fireListeners(EVENT_TYPE.CHANGE_STYLE);\n // }\n clone(): Style {\n return new Style(this);\n }\n}\n"]}
|
package/cjs/index.d.ts
CHANGED
|
@@ -4,13 +4,14 @@ import * as data from './data';
|
|
|
4
4
|
import * as register from './register';
|
|
5
5
|
import * as themes from './themes';
|
|
6
6
|
import * as DataStatistics from './dataset/DataStatistics';
|
|
7
|
-
import type { ColumnDefine, ColumnsDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, ListTableConstructorOptions, PivotTableConstructorOptions, IHeaderTreeDefine, IDimension } from './ts-types';
|
|
7
|
+
import type { ColumnDefine, ColumnsDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, ListTableConstructorOptions, PivotTableConstructorOptions, PivotChartConstructorOptions, IHeaderTreeDefine, IDimension } from './ts-types';
|
|
8
8
|
import { ListTable } from './ListTable';
|
|
9
9
|
import { PivotTable } from './PivotTable';
|
|
10
|
+
import { PivotChart } from './PivotChart';
|
|
10
11
|
import type { MousePointerCellEvent } from './ts-types/events';
|
|
11
12
|
import * as CustomLayout from './render/layout';
|
|
12
|
-
export declare const version = "0.9.
|
|
13
|
-
export { TYPES, core, ListTable, ListTableConstructorOptions, PivotTable, PivotTableConstructorOptions, IHeaderTreeDefine, IDimension, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, themes, data, MousePointerCellEvent, getIcons, clearGlobal, register, DataStatistics, CustomLayout };
|
|
13
|
+
export declare const version = "0.9.3-alpha.1";
|
|
14
|
+
export { TYPES, core, ListTable, ListTableConstructorOptions, PivotTable, PivotTableConstructorOptions, PivotChartConstructorOptions, PivotChart, IHeaderTreeDefine, IDimension, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, themes, data, MousePointerCellEvent, getIcons, clearGlobal, register, DataStatistics, CustomLayout };
|
|
14
15
|
declare function getIcons(): {
|
|
15
16
|
[key: string]: TYPES.ColumnIconOption;
|
|
16
17
|
};
|
package/cjs/index.js
CHANGED
|
@@ -27,7 +27,7 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
|
|
|
27
27
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", {
|
|
29
29
|
value: !0
|
|
30
|
-
}), exports.CustomLayout = exports.DataStatistics = exports.register = exports.clearGlobal = exports.getIcons = exports.data = exports.themes = exports.PivotTable = exports.ListTable = exports.core = exports.TYPES = exports.version = void 0;
|
|
30
|
+
}), exports.CustomLayout = exports.DataStatistics = exports.register = exports.clearGlobal = exports.getIcons = exports.data = exports.themes = exports.PivotChart = exports.PivotTable = exports.ListTable = exports.core = exports.TYPES = exports.version = void 0;
|
|
31
31
|
|
|
32
32
|
const TYPES = __importStar(require("./ts-types"));
|
|
33
33
|
|
|
@@ -71,6 +71,15 @@ Object.defineProperty(exports, "PivotTable", {
|
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
73
|
|
|
74
|
+
const PivotChart_1 = require("./PivotChart");
|
|
75
|
+
|
|
76
|
+
Object.defineProperty(exports, "PivotChart", {
|
|
77
|
+
enumerable: !0,
|
|
78
|
+
get: function() {
|
|
79
|
+
return PivotChart_1.PivotChart;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
|
|
74
83
|
const CustomLayout = __importStar(require("./render/layout"));
|
|
75
84
|
|
|
76
85
|
function getIcons() {
|
|
@@ -81,6 +90,6 @@ function clearGlobal() {
|
|
|
81
90
|
register.clearAll();
|
|
82
91
|
}
|
|
83
92
|
|
|
84
|
-
exports.CustomLayout = CustomLayout, exports.version = "0.9.
|
|
93
|
+
exports.CustomLayout = CustomLayout, exports.version = "0.9.3-alpha.1", exports.getIcons = getIcons,
|
|
85
94
|
exports.clearGlobal = clearGlobal, TYPES.AggregationType;
|
|
86
95
|
//# sourceMappingURL=index.js.map
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAqClC,sBAAK;AApCP,6CAA+B;AAqC7B,oBAAI;AApCN,6CAA+B;AAuD7B,oBAAI;AAtDN,+CAAiC;AACjC,qDAAuC;AA0DrC,4BAAQ;AAzDV,iDAAmC;AAmDjC,wBAAM;AAlDR,yEAA2D;AA4DzD,wCAAc;AA3ChB,2CAAwC;AAgBtC,0FAhBO,qBAAS,OAgBP;AAfX,6CAA0C;AAiBxC,2FAjBO,uBAAU,OAiBP;AAhBZ,6CAA0C;AAmBxC,2FAnBO,uBAAU,OAmBP;AAjBZ,8DAAgD;AAwC9C,oCAAY;AAvCD,QAAA,OAAO,GAAG,eAAe,CAAC;AA2CvC,SAAS,QAAQ;IAGf,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC;AACrB,CAAC;AAhBC,4BAAQ;AAkBV,SAAS,WAAW;IAClB,QAAQ,CAAC,QAAQ,EAAE,CAAC;AAGtB,CAAC;AArBC,kCAAW;AAsBb,KAAK,CAAC,eAAe,CAAC","file":"index.js","sourcesContent":["/* eslint-disable sort-imports */\nimport * as TYPES from './ts-types';\nimport * as core from './core';\nimport * as data from './data';\nimport * as icons from './icons';\nimport * as register from './register';\nimport * as themes from './themes';\nimport * as DataStatistics from './dataset/DataStatistics';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n ListTableConstructorOptions,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n IHeaderTreeDefine,\n IDimension\n} from './ts-types';\nimport { ListTable } from './ListTable';\nimport { PivotTable } from './PivotTable';\nimport { PivotChart } from './PivotChart';\nimport type { MousePointerCellEvent } from './ts-types/events';\nimport * as CustomLayout from './render/layout';\nexport const version = \"0.9.3-alpha.1\";\n/**\n * @namespace VTable\n */\nexport {\n /**\n * Types\n * @namespace VTable.TYPES\n */\n TYPES,\n core,\n ListTable,\n ListTableConstructorOptions,\n PivotTable,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n PivotChart,\n IHeaderTreeDefine,\n IDimension,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n themes,\n data,\n MousePointerCellEvent,\n getIcons,\n clearGlobal,\n //plugin registers\n register,\n /**\n * 暂不推荐使用\n */\n DataStatistics,\n CustomLayout\n};\n\n/** @private */\nfunction getIcons(): {\n [key: string]: TYPES.ColumnIconOption;\n} {\n return icons.get();\n}\n/** 清理内部的全局变量 如注册的icon theme等 以及共享的header column类实例 */\nfunction clearGlobal() {\n register.clearAll();\n // headers.type.clearGlobal();\n // columns.type.clearGlobal();\n}\nTYPES.AggregationType;\n"]}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.getAxisConfigInPivotChart = void 0;
|
|
6
|
+
|
|
7
|
+
const vutils_1 = require("@visactor/vutils");
|
|
8
|
+
|
|
9
|
+
function getAxisConfigInPivotChart(col, row, layout) {
|
|
10
|
+
if (layout._table.isPivotChart()) if (layout.indicatorsAsCol) {
|
|
11
|
+
if (layout.hasTwoIndicatorAxes && row === layout.columnHeaderLevelCount - 1 && col >= layout.rowHeaderLevelCount && col < layout.colCount - layout.rightFrozenColCount) {
|
|
12
|
+
let defaultKey = layout.getIndicatorKeyInChartSpec(col, layout.columnHeaderLevelCount - 1)[1];
|
|
13
|
+
if ((0, vutils_1.isArray)(defaultKey) && (defaultKey = defaultKey[0]), !defaultKey) return;
|
|
14
|
+
const data = layout.dataset.collectedValues[defaultKey + "_align"] ? layout.dataset.collectedValues[defaultKey + "_align"] : layout.dataset.collectedValues[defaultKey], index = layout.getRecordIndexByCol(col), range = data[layout.getColKeysPath()[index][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]], axisOption = layout._table.pivotChartAxes.find((axisOption => "top" === axisOption.orient));
|
|
15
|
+
if (!1 === (null == axisOption ? void 0 : axisOption.visible)) return;
|
|
16
|
+
return (0, vutils_1.merge)({}, axisOption, {
|
|
17
|
+
orient: "top",
|
|
18
|
+
type: "linear",
|
|
19
|
+
range: range,
|
|
20
|
+
label: {
|
|
21
|
+
flush: !0
|
|
22
|
+
},
|
|
23
|
+
title: {
|
|
24
|
+
visible: !1
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
if (row === layout.rowCount - layout.bottomFrozenRowCount && col >= layout.rowHeaderLevelCount && col < layout.colCount - layout.rightFrozenColCount) {
|
|
29
|
+
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
|
|
30
|
+
let defaultKey = indicatorKeys[0];
|
|
31
|
+
(0, vutils_1.isArray)(defaultKey) && (defaultKey = defaultKey[0]);
|
|
32
|
+
const data = layout.dataset.collectedValues[defaultKey + "_align"] ? layout.dataset.collectedValues[defaultKey + "_align"] : layout.dataset.collectedValues[defaultKey], index = layout.getRecordIndexByCol(col), range = data[layout.getColKeysPath()[index][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]];
|
|
33
|
+
let indicatorInfo = null;
|
|
34
|
+
indicatorKeys.forEach((key => {
|
|
35
|
+
const info = layout.getIndicatorInfo(key);
|
|
36
|
+
info && (indicatorInfo = info);
|
|
37
|
+
}));
|
|
38
|
+
const axisOption = layout._table.pivotChartAxes.find((axisOption => "bottom" === axisOption.orient));
|
|
39
|
+
if (!1 === (null == axisOption ? void 0 : axisOption.visible)) return;
|
|
40
|
+
return (0, vutils_1.merge)({}, axisOption, {
|
|
41
|
+
orient: "bottom",
|
|
42
|
+
type: "linear",
|
|
43
|
+
range: range,
|
|
44
|
+
label: {
|
|
45
|
+
flush: !0
|
|
46
|
+
},
|
|
47
|
+
title: {
|
|
48
|
+
text: null == indicatorInfo ? void 0 : indicatorInfo.caption,
|
|
49
|
+
autoRotate: !0
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
if (col === layout.rowHeaderLevelCount - 1 && row >= layout.rowHeaderLevelCount && row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
54
|
+
let rowDimensionKey = layout.getDimensionKeyInChartSpec(layout.rowHeaderLevelCount, row)[0];
|
|
55
|
+
(0, vutils_1.isArray)(rowDimensionKey) && (rowDimensionKey = rowDimensionKey[0]);
|
|
56
|
+
const data = layout.dataset.collectedValues[rowDimensionKey], recordRow = layout.getRecordIndexByRow(row), rowPath = layout.getRowKeysPath()[recordRow], domain = data[rowPath[rowPath.length - 1]], axisOption = layout._table.pivotChartAxes.find((axisOption => "left" === axisOption.orient));
|
|
57
|
+
if (!1 === (null == axisOption ? void 0 : axisOption.visible)) return;
|
|
58
|
+
return (0, vutils_1.merge)({}, axisOption, {
|
|
59
|
+
orient: "left",
|
|
60
|
+
type: "band",
|
|
61
|
+
data: Array.from(domain).reverse(),
|
|
62
|
+
title: {
|
|
63
|
+
visible: !1
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
} else {
|
|
68
|
+
if (col === layout.rowHeaderLevelCount - 1 && row >= layout.columnHeaderLevelCount && row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
69
|
+
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
|
|
70
|
+
let defaultKey = indicatorKeys[0];
|
|
71
|
+
(0, vutils_1.isArray)(defaultKey) && (defaultKey = defaultKey[0]);
|
|
72
|
+
const data = layout.dataset.collectedValues[defaultKey + "_align"] ? layout.dataset.collectedValues[defaultKey + "_align"] : layout.dataset.collectedValues[defaultKey], index = layout.getRecordIndexByRow(row), range = data[layout.getRowKeysPath()[index][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]];
|
|
73
|
+
let indicatorInfo = null;
|
|
74
|
+
indicatorKeys.forEach((key => {
|
|
75
|
+
const info = layout.getIndicatorInfo(key);
|
|
76
|
+
info && (indicatorInfo = info);
|
|
77
|
+
}));
|
|
78
|
+
const axisOption = layout._table.pivotChartAxes.find((axisOption => "left" === axisOption.orient));
|
|
79
|
+
if (!1 === (null == axisOption ? void 0 : axisOption.visible)) return;
|
|
80
|
+
return (0, vutils_1.merge)({}, axisOption, {
|
|
81
|
+
orient: "left",
|
|
82
|
+
type: "linear",
|
|
83
|
+
range: range,
|
|
84
|
+
label: {
|
|
85
|
+
flush: !0
|
|
86
|
+
},
|
|
87
|
+
title: {
|
|
88
|
+
text: null == indicatorInfo ? void 0 : indicatorInfo.caption,
|
|
89
|
+
autoRotate: !0
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
if (col === layout.colCount - layout.rightFrozenColCount && row >= layout.columnHeaderLevelCount && row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
94
|
+
let defaultKey = layout.getIndicatorKeyInChartSpec(layout.rowHeaderLevelCount - 1, row)[1];
|
|
95
|
+
if ((0, vutils_1.isArray)(defaultKey) && (defaultKey = defaultKey[0]), !defaultKey) return;
|
|
96
|
+
const data = layout.dataset.collectedValues[defaultKey + "_align"] ? layout.dataset.collectedValues[defaultKey + "_align"] : layout.dataset.collectedValues[defaultKey], index = layout.getRecordIndexByRow(row), range = data[layout.getRowKeysPath()[index][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]], axisOption = layout._table.pivotChartAxes.find((axisOption => "right" === axisOption.orient));
|
|
97
|
+
if (!1 === (null == axisOption ? void 0 : axisOption.visible)) return;
|
|
98
|
+
return (0, vutils_1.merge)({}, axisOption, {
|
|
99
|
+
orient: "right",
|
|
100
|
+
type: "linear",
|
|
101
|
+
range: range,
|
|
102
|
+
label: {
|
|
103
|
+
flush: !0
|
|
104
|
+
},
|
|
105
|
+
title: {
|
|
106
|
+
visible: !1
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
if (row === layout.rowCount - layout.bottomFrozenRowCount && col >= layout.rowHeaderLevelCount && col < layout.colCount - layout.rightFrozenColCount) {
|
|
111
|
+
let columnDimensionKey = layout.getDimensionKeyInChartSpec(col, layout.columnHeaderLevelCount)[0];
|
|
112
|
+
(0, vutils_1.isArray)(columnDimensionKey) && (columnDimensionKey = columnDimensionKey[0]);
|
|
113
|
+
const data = layout.dataset.collectedValues[columnDimensionKey], recordCol = layout.getRecordIndexByCol(col), colPath = layout.getColKeysPath()[recordCol], domain = data[colPath[colPath.length - 1]], axisOption = layout._table.pivotChartAxes.find((axisOption => "bottom" === axisOption.orient));
|
|
114
|
+
if (!1 === (null == axisOption ? void 0 : axisOption.visible)) return;
|
|
115
|
+
return (0, vutils_1.merge)({}, axisOption, {
|
|
116
|
+
orient: "bottom",
|
|
117
|
+
type: "band",
|
|
118
|
+
data: Array.from(domain),
|
|
119
|
+
title: {
|
|
120
|
+
visible: !1
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
exports.getAxisConfigInPivotChart = getAxisConfigInPivotChart;
|
|
128
|
+
//# sourceMappingURL=get-axis-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["layout/chart-helper/get-axis-config.ts"],"names":[],"mappings":";;;AAAA,6CAAkD;AAKlD,SAAgB,yBAAyB,CAAC,GAAW,EAAE,GAAW,EAAE,MAAsB;IACxF,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE;QACjC,OAAO,SAAS,CAAC;KAClB;IAGD,IAAI,MAAM,CAAC,eAAe,EAAE;QAC1B,IACE,MAAM,CAAC,mBAAmB;YAC1B,GAAG,KAAK,MAAM,CAAC,sBAAsB,GAAG,CAAC;YACzC,GAAG,IAAI,MAAM,CAAC,mBAAmB;YACjC,GAAG,GAAG,MAAM,CA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A,cAAK,EAAC,EAAE,EAAE,UAAU,EAAE;gBAC3B,MAAM,EAAE,QAAQ;gBAChB,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;gBACxB,KAAK,EAAE;oBACL,OAAO,EAAE,KAAK;iBACf;aACF,CAAC,CAAC;SACJ;KACF;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAjQD,8DAiQC","file":"get-axis-config.js","sourcesContent":["import { isArray, merge } from '@visactor/vutils';\nimport type { PivotLayoutMap } from '../pivot-layout';\nimport type { ITableAxisOption } from '../../ts-types/component/axis';\nimport type { PivotChart } from '../../PivotChart';\n\nexport function getAxisConfigInPivotChart(col: number, row: number, layout: PivotLayoutMap): any {\n if (!layout._table.isPivotChart()) {\n return undefined;\n }\n\n // 是否是指标\n if (layout.indicatorsAsCol) {\n if (\n layout.hasTwoIndicatorAxes &&\n row === layout.columnHeaderLevelCount - 1 &&\n col >= layout.rowHeaderLevelCount &&\n col < layout.colCount - layout.rightFrozenColCount\n ) {\n const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, layout.columnHeaderLevelCount - 1);\n let defaultKey = indicatorKeys[1];\n if (isArray(defaultKey)) {\n defaultKey = defaultKey[0];\n }\n if (!defaultKey) {\n return undefined;\n }\n // const data = layout.dataset.collectedValues[defaultKey];\n const data = layout.dataset.collectedValues[defaultKey + '_align']\n ? layout.dataset.collectedValues[defaultKey + '_align']\n : layout.dataset.collectedValues[defaultKey];\n const index = layout.getRecordIndexByCol(col);\n const range =\n data[layout.getColKeysPath()[index][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]];\n\n const axisOption = ((layout._table as PivotChart).pivotChartAxes as ITableAxisOption[]).find(axisOption => {\n return axisOption.orient === 'top';\n });\n if (axisOption?.visible === false) {\n return;\n }\n // 顶部副指标轴\n return merge({}, axisOption, {\n orient: 'top',\n type: 'linear',\n range: range,\n label: {\n flush: true\n },\n // grid: {\n // visible: true\n // },\n title: {\n visible: false\n }\n });\n } else if (\n row === layout.rowCount - layout.bottomFrozenRowCount &&\n col >= layout.rowHeaderLevelCount &&\n col < layout.colCount - layout.rightFrozenColCount\n ) {\n const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);\n let defaultKey = indicatorKeys[0];\n if (isArray(defaultKey)) {\n defaultKey = defaultKey[0];\n }\n // const data = layout.dataset.collectedValues[defaultKey];\n const data = layout.dataset.collectedValues[defaultKey + '_align']\n ? layout.dataset.collectedValues[defaultKey + '_align']\n : layout.dataset.collectedValues[defaultKey];\n const index = layout.getRecordIndexByCol(col);\n const range =\n data[layout.getColKeysPath()[index][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]];\n let indicatorInfo = null;\n indicatorKeys.forEach(key => {\n const info = layout.getIndicatorInfo(key);\n if (info) {\n indicatorInfo = info;\n }\n });\n\n const axisOption = ((layout._table as PivotChart).pivotChartAxes as ITableAxisOption[]).find(axisOption => {\n return axisOption.orient === 'bottom';\n });\n if (axisOption?.visible === false) {\n return;\n }\n // 底侧指标轴\n return merge({}, axisOption, {\n orient: 'bottom',\n type: 'linear',\n range: range,\n label: {\n flush: true\n },\n // grid: {\n // visible: true\n // },\n title: {\n // visible: true,\n text: (indicatorInfo as any)?.caption,\n autoRotate: true\n }\n });\n } else if (\n col === layout.rowHeaderLevelCount - 1 &&\n row >= layout.rowHeaderLevelCount &&\n row < layout.rowCount - layout.bottomFrozenRowCount\n ) {\n let rowDimensionKey = layout.getDimensionKeyInChartSpec(layout.rowHeaderLevelCount, row)[0];\n if (isArray(rowDimensionKey)) {\n rowDimensionKey = rowDimensionKey[0];\n }\n const data = layout.dataset.collectedValues[rowDimensionKey];\n\n const recordRow = layout.getRecordIndexByRow(row);\n const rowPath = layout.getRowKeysPath()[recordRow];\n const domain = data[rowPath[rowPath.length - 1]] as Array<string>;\n\n const axisOption = ((layout._table as PivotChart).pivotChartAxes as ITableAxisOption[]).find(axisOption => {\n return axisOption.orient === 'left';\n });\n if (axisOption?.visible === false) {\n return;\n }\n // 左侧维度轴\n return merge({}, axisOption, {\n orient: 'left',\n type: 'band',\n data: Array.from(domain).reverse(),\n title: {\n visible: false\n }\n });\n }\n } else {\n if (\n col === layout.rowHeaderLevelCount - 1 &&\n row >= layout.columnHeaderLevelCount &&\n row < layout.rowCount - layout.bottomFrozenRowCount\n ) {\n const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);\n let defaultKey = indicatorKeys[0];\n if (isArray(defaultKey)) {\n defaultKey = defaultKey[0];\n }\n // const data = layout.dataset.collectedValues[defaultKey];\n const data = layout.dataset.collectedValues[defaultKey + '_align']\n ? layout.dataset.collectedValues[defaultKey + '_align']\n : layout.dataset.collectedValues[defaultKey];\n const index = layout.getRecordIndexByRow(row);\n const range =\n data[layout.getRowKeysPath()[index][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]];\n let indicatorInfo = null;\n indicatorKeys.forEach(key => {\n const info = layout.getIndicatorInfo(key);\n if (info) {\n indicatorInfo = info;\n }\n });\n\n const axisOption = ((layout._table as PivotChart).pivotChartAxes as ITableAxisOption[]).find(axisOption => {\n return axisOption.orient === 'left';\n });\n if (axisOption?.visible === false) {\n return;\n }\n // 左侧指标轴\n return merge({}, axisOption, {\n orient: 'left',\n type: 'linear',\n range: range,\n label: {\n flush: true\n },\n // grid: {\n // visible: true\n // },\n title: {\n // visible: true,\n text: (indicatorInfo as any)?.caption,\n autoRotate: true\n }\n });\n } else if (\n col === layout.colCount - layout.rightFrozenColCount &&\n row >= layout.columnHeaderLevelCount &&\n row < layout.rowCount - layout.bottomFrozenRowCount\n ) {\n const indicatorKeys = layout.getIndicatorKeyInChartSpec(layout.rowHeaderLevelCount - 1, row);\n let defaultKey = indicatorKeys[1];\n if (isArray(defaultKey)) {\n defaultKey = defaultKey[0];\n }\n\n if (!defaultKey) {\n return undefined;\n }\n // const data = layout.dataset.collectedValues[defaultKey];\n const data = layout.dataset.collectedValues[defaultKey + '_align']\n ? layout.dataset.collectedValues[defaultKey + '_align']\n : layout.dataset.collectedValues[defaultKey];\n const index = layout.getRecordIndexByRow(row);\n const range =\n data[layout.getRowKeysPath()[index][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]];\n\n const axisOption = ((layout._table as PivotChart).pivotChartAxes as ITableAxisOption[]).find(axisOption => {\n return axisOption.orient === 'right';\n });\n if (axisOption?.visible === false) {\n return;\n }\n // 右侧副指标轴\n return merge({}, axisOption, {\n orient: 'right',\n type: 'linear',\n range: range,\n label: {\n flush: true\n },\n // grid: {\n // visible: true\n // },\n title: {\n visible: false\n }\n });\n } else if (\n row === layout.rowCount - layout.bottomFrozenRowCount &&\n col >= layout.rowHeaderLevelCount &&\n col < layout.colCount - layout.rightFrozenColCount\n ) {\n // const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);\n\n let columnDimensionKey = layout.getDimensionKeyInChartSpec(col, layout.columnHeaderLevelCount)[0];\n if (isArray(columnDimensionKey)) {\n columnDimensionKey = columnDimensionKey[0];\n }\n const data = layout.dataset.collectedValues[columnDimensionKey];\n\n const recordCol = layout.getRecordIndexByCol(col);\n const colPath = layout.getColKeysPath()[recordCol];\n const domain = data[colPath[colPath.length - 1]] as Array<string>;\n\n const axisOption = ((layout._table as PivotChart).pivotChartAxes as ITableAxisOption[]).find(axisOption => {\n return axisOption.orient === 'bottom';\n });\n if (axisOption?.visible === false) {\n return;\n }\n // 底部维度轴\n return merge({}, axisOption, {\n orient: 'bottom',\n type: 'band',\n data: Array.from(domain),\n title: {\n visible: false\n }\n });\n }\n }\n\n return undefined;\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PivotLayoutMap } from '../pivot-layout';
|
|
2
|
+
import type { PivotHeaderLayoutMap } from '../pivot-header-layout';
|
|
3
|
+
import type { SimpleHeaderLayoutMap } from '../simple-header-layout';
|
|
4
|
+
export declare function getRawChartSpec(col: number, row: number, layout: PivotLayoutMap | PivotHeaderLayoutMap): any;
|
|
5
|
+
export declare function getChartSpec(col: number, row: number, layout: PivotLayoutMap): any;
|
|
6
|
+
export declare function getChartAxes(col: number, row: number, layout: PivotLayoutMap): any;
|
|
7
|
+
export declare function getChartDataId(col: number, row: number, layout: PivotLayoutMap | PivotHeaderLayoutMap | SimpleHeaderLayoutMap): string | Record<string, string>;
|