@univerjs-pro/engine-chart 0.6.6 → 0.6.7

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.
@@ -1,4 +1,5 @@
1
1
  export { ChartDataSource } from './source/chart-source';
2
+ export type { IChartModelInitParams } from './model/mode-converter/mode-converter';
2
3
  export type { DimensionDefinitionLoose, IChartDataSource, IDimensionDefinition, IUniverDataSet, OptionDataValue, } from './types';
3
4
  export { ChartModel } from './model/chart-model';
4
5
  export { buildChartData } from './model/chart-data-operators/build-chart-data';
@@ -14,3 +15,4 @@ export { chartBitsUtils } from './util';
14
15
  export type { ChartDataSourceValue, ChartDataSourceValues, ChartStyle, DeepPartial, IAllSeriesStyle, IAxisOptions, IChartConfig, IChartContext, IChartData, IChartDataAggregation, IChartDataCategory, IChartDataSeries, IChartHostRect, IChartInstance, IChartRenderModel, IChartSnapshot, IChartStyle, IGridLineStyle, ILabelStyle, ILegendStyle, IPieLabelStyle, IPointStyle, IRuntimeAxis, ISeriesLabelStyle, ISeriesStyle, RightYAxisOptions, } from './types';
15
16
  export { EChartRenderModel } from './model/echart-render-model';
16
17
  export { convertModelFromInitData, convertModelToSpec } from './model/mode-converter/mode-converter';
18
+ export { echartToChartModelInit, isChartModelInit } from './model/echart-to-chart-model-init';
@@ -15,8 +15,7 @@ export declare class EChartRenderModel extends Disposable implements IChartRende
15
15
  };
16
16
  }
17
17
  export declare class EChartRenderEngine extends Disposable implements EChartInstance {
18
- [Symbol.dispose](): void;
19
- static name: string;
18
+ static engineName: string;
20
19
  private _instance;
21
20
  container: HTMLElement | string;
22
21
  private _devicePixelRatio;
@@ -0,0 +1,3 @@
1
+ import { IChartModelInitParams } from './mode-converter/mode-converter';
2
+ export declare function echartToChartModelInit(echartOption: echarts.EChartsOption): IChartModelInitParams;
3
+ export declare function isChartModelInit(option: any): option is IChartModelInitParams;
@@ -45,6 +45,10 @@ export interface IChartModelInitParams {
45
45
  * The theme name of the chart model. This property will be provided by chart model json.
46
46
  */
47
47
  themeName?: string;
48
+ /**
49
+ * The direction of the data source. If the data source is column direction, the value should be false.The default value is true.
50
+ */
51
+ isRowDirection?: boolean;
48
52
  }
49
53
  /**
50
54
  * Convert the initial data to a chart model.
@@ -11,7 +11,7 @@ export declare abstract class ChartDataSource implements IChartDataSource {
11
11
  * The data source can switch the orient or not
12
12
  */
13
13
  canSwitchOrient$: Observable<boolean>;
14
- protected _isRowDirection: BehaviorSubject<boolean>;
14
+ protected _isRowDirection$: BehaviorSubject<boolean>;
15
15
  /**
16
16
  * The data source is row direction or not
17
17
  */
@@ -23,6 +23,7 @@ export declare abstract class ChartDataSource implements IChartDataSource {
23
23
  constructor();
24
24
  protected _init(): void;
25
25
  setData(data: IUniverDataSet): void;
26
+ get isRowDirection(): boolean;
26
27
  updateCanSwitchOrient(flag: boolean): void;
27
28
  updateIsRowDirection(flag: boolean): void;
28
29
  getDataSet(): IUniverDataSet;
@@ -1,7 +1,11 @@
1
1
  import { IUniverDataSet } from '../types';
2
2
  import { ChartDataSource } from './chart-source';
3
3
  export declare class StaticChartSource extends ChartDataSource {
4
+ private _columnDirectionDataSetCache;
4
5
  constructor();
5
- initData(data: IUniverDataSet): void;
6
+ initData(data: IUniverDataSet, isRowDirection?: boolean): void;
7
+ updateIsRowDirection(flag: boolean): void;
8
+ refresh(): void;
6
9
  convertDataSet(): IUniverDataSet;
10
+ dispose(): void;
7
11
  }