@datosgeo-atdt/core-ui 0.1.1 → 0.2.0

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,23 +1,4 @@
1
1
  import React from "react";
2
- interface SeriesKey {
3
- key: string;
4
- name?: string;
5
- map: string;
6
- color?: string;
7
- bgColor?: string;
8
- invert?: boolean;
9
- yAxisIndex?: number;
10
- }
11
- interface GraphLinesProps {
12
- data: Record<string, any>[];
13
- xAxisInfo: string[];
14
- mapKey: string;
15
- yAxisInfo?: any;
16
- barSeriesKeys?: SeriesKey[];
17
- lineSeriesKeys?: SeriesKey[];
18
- showSecondaryYAxis?: boolean;
19
- portrait?: boolean;
20
- }
2
+ import type { GraphLinesProps } from "./BarlineChart.types";
21
3
  export declare const BarLineChart: React.FC<GraphLinesProps>;
22
- export {};
23
4
  //# sourceMappingURL=BarLineChart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BarLineChart.d.ts","sourceRoot":"","sources":["../../../src/components/BarLineChart/BarLineChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAuB1D,UAAU,SAAS;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;IAC5B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAC,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,GAAG,CAAC;IAChB,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC;IAC5B,cAAc,CAAC,EAAE,SAAS,EAAE,CAAC;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;CAEpB;AAgCD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0NlD,CAAC"}
1
+ {"version":3,"file":"BarLineChart.d.ts","sourceRoot":"","sources":["../../../src/components/BarLineChart/BarLineChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAa1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAoD5D,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAwOlD,CAAC"}
@@ -0,0 +1,56 @@
1
+ import type { SeriesKey } from "../../types/chart";
2
+ import type { CSSProperties } from "react";
3
+ export interface GraphLinesProps {
4
+ /** Recibe un array con objetos, este debe contener los datos que se graficarán y la propiedad con la que se mapeará respecto al eje x */
5
+ data: Record<string, any>[];
6
+ /** Información que se mostrará en el eje x */
7
+ xAxisInfo: string[];
8
+ /** Propiedad con la que se mapearán los datos respecto al eje x (ejemplo: mes) */
9
+ mapKey: string;
10
+ /** Configuración general para eje y */
11
+ yAxisInfo?: YAxisInfo;
12
+ /** Configuración para los datos que se mostrarán en forma de Barras */
13
+ barSeriesKeys?: SeriesKey[];
14
+ /** Configuración para los datos que se mostrarán en forma de Líneas */
15
+ lineSeriesKeys?: SeriesKey[];
16
+ /** Habilita un eje y secundario *No aplica en Portrait*/
17
+ showSecondaryYAxis?: boolean;
18
+ /** Modifica la orientación de la gráfica a vertical */
19
+ portrait?: boolean;
20
+ /** Inserta estilos personalizados *AL CONTENEDOR DE LA GRÁFICA* */
21
+ containerStyles?: CSSProperties;
22
+ /** Inserta estilos personalizados *AL la referencia chartRef (gráfica)* */
23
+ chartStyles?: CSSProperties;
24
+ }
25
+ /**
26
+ * Límites numéricos del eje Y.
27
+ */
28
+ export interface YAxisLimits {
29
+ /*** Valor mínimo mostrado en el eje */
30
+ min?: number;
31
+ /*** Valor máximo mostrado en el eje */
32
+ max?: number;
33
+ }
34
+ /**
35
+ * Configuración de un eje Y individual.
36
+ */
37
+ export interface YAxisConfig {
38
+ /*** Etiqueta del eje */
39
+ label: string;
40
+ /*** Límites del eje */
41
+ limits?: YAxisLimits;
42
+ /*** Indica si los valores se muestran en valor absoluto */
43
+ absolute?: boolean;
44
+ }
45
+ /**
46
+ * Configuración de los ejes Y del gráfico.
47
+ * - yAxis0 es obligatorio
48
+ * - yAxis1 es opcional
49
+ */
50
+ export interface YAxisInfo {
51
+ /*** Eje Y principal *OBLIGATORIO**/
52
+ yAxis0: YAxisConfig;
53
+ /*** Eje Y secundario *OPCIONAL* */
54
+ yAxis1?: YAxisConfig;
55
+ }
56
+ //# sourceMappingURL=BarlineChart.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BarlineChart.types.d.ts","sourceRoot":"","sources":["../../../src/components/BarLineChart/BarlineChart.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,WAAW,eAAe;IAC/B,yIAAyI;IACxI,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;IAC7B,8CAA8C;IAC7C,SAAS,EAAE,MAAM,EAAE,CAAC;IACrB,kFAAkF;IACjF,MAAM,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACtC,SAAS,CAAC,EAAE,SAAS,CAAC;IACvB,uEAAuE;IACtE,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC;IAC7B,uEAAuE;IAEtE,cAAc,CAAC,EAAE,SAAS,EAAE,CAAC;IAC9B,yDAAyD;IACxD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC9B,uDAAuD;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACpB,mEAAmE;IAClE,eAAe,CAAC,EAAE,aAAa,CAAC;IACjC,2EAA2E;IAC1E,WAAW,CAAC,EAAE,aAAa,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B,uCAAuC;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B,wBAAwB;IACvB,KAAK,EAAE,MAAM,CAAC;IACf,uBAAuB;IACtB,MAAM,CAAC,EAAE,WAAW,CAAC;IACtB,2DAA2D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACzB,oCAAoC;IACnC,MAAM,EAAE,WAAW,CAAC;IACrB,mCAAmC;IAClC,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB"}
@@ -0,0 +1,3 @@
1
+ export { BarLineChart } from "./BarLineChart";
2
+ export type { GraphLinesProps } from "./BarlineChart.types";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BarLineChart/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC3C,YAAY,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAA"}