@nocobase/plugin-data-visualization 0.21.0-alpha.9 → 1.0.0-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.
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { FieldOption } from '../hooks';
3
- import { QueryProps } from '../renderer';
3
+ import { DimensionProps, MeasureProps } from '../renderer';
4
4
  import { ISchema } from '@formily/react';
5
- import { AnySchemaProperties, Config } from './configs';
5
+ import { AnySchemaProperties, Config, FieldConfigProps } from './configs';
6
6
  import { Transformer } from '../transformers';
7
7
  export type RenderProps = {
8
8
  data: Record<string, any>[];
@@ -22,8 +22,8 @@ export interface ChartType {
22
22
  Component: React.FC<any>;
23
23
  schema: ISchema;
24
24
  init?: (fields: FieldOption[], query: {
25
- measures?: QueryProps['measures'];
26
- dimensions?: QueryProps['dimensions'];
25
+ measures?: MeasureProps[];
26
+ dimensions?: DimensionProps[];
27
27
  }) => {
28
28
  general?: any;
29
29
  advanced?: any;
@@ -55,11 +55,11 @@ export declare class Chart implements ChartType {
55
55
  properties: AnySchemaProperties;
56
56
  };
57
57
  addConfigs(configs: {
58
- [key: string]: Function;
58
+ [key: string]: (props: FieldConfigProps) => AnySchemaProperties;
59
59
  }): void;
60
60
  infer(fields: FieldOption[], { measures, dimensions, }: {
61
- measures?: QueryProps['measures'];
62
- dimensions?: QueryProps['dimensions'];
61
+ measures?: MeasureProps[];
62
+ dimensions?: DimensionProps[];
63
63
  }): {
64
64
  xField: FieldOption;
65
65
  yField: FieldOption;