@statisticsfinland/pxvisualizer 1.0.8-d.5 → 1.0.8-t.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.
@@ -6,6 +6,7 @@ export declare function getAxisLabelFormatterFunction(locale: string): AxisLabel
6
6
  export declare const formatLocale: (locale: string) => string;
7
7
  export declare function getAxisLabelShorteningFunction(valueAmount?: number | null): AxisLabelsFormatterCallbackFunction;
8
8
  export declare function getDataLabelShorteningFunction(showData: boolean): DataLabelsFormatterCallbackFunction;
9
+ export declare function getDataLabelFormatterFunction(locale: string): DataLabelsFormatterCallbackFunction;
9
10
  export declare function getLegendLabelShorteningFunction(): FormatterCallbackFunction<Series | Point>;
10
11
  export declare const shortenStringValue: (value: string | number, limit?: number) => string;
11
12
  export declare function getScatterPlotScreenReaderFormatterCallbackFunction(view: View, locale: string): ScreenReaderFormatterCallbackFunction<Point>;
@@ -10,6 +10,7 @@ export declare const buildHighchartSeries: (view: View, type: SeriesType, locale
10
10
  name: string;
11
11
  custom: {
12
12
  preliminary: boolean;
13
+ precision: number;
13
14
  };
14
15
  }[];
15
16
  }[];
@@ -5,6 +5,7 @@ export declare const commonYAxisOptions: YAxisOptions;
5
5
  export declare const commonDatalabelsOptions: (view: View, locale: string) => {
6
6
  enabled: boolean | undefined;
7
7
  style: import("highcharts").CSSObject | undefined;
8
+ formatter: import("highcharts").DataLabelsFormatterCallbackFunction;
8
9
  };
9
10
  export declare const commonBasicHorizontalBarChartYAxisOptions: (view: View, locale: string) => YAxisOptions;
10
11
  export declare const commonHorizontalBarChartOptions: (view: View, locale: string) => Options;
@@ -1,10 +1,10 @@
1
1
  import { IQueryVisualizationResponse } from "../types";
2
2
  import { TMultiLanguageString } from "../types/queryVisualizationResponse";
3
- import { IDataSeries, View } from "../types/view";
3
+ import { IDataSeries, TSingleSelections, View } from "../types/view";
4
4
  import { TVariableSelections } from "../types/variableSelections";
5
5
  export declare function convertPxGrafResponseToView(responseObj: IQueryVisualizationResponse, selectedValueCodes: TVariableSelections): View;
6
6
  export declare function convertToRelative(input: View): View;
7
- export declare function buildSeries(responseObj: IQueryVisualizationResponse, selectedValueCodes: TVariableSelections): {
7
+ export declare function buildSeries(responseObj: IQueryVisualizationResponse, selectedValueCodes: TSingleSelections): {
8
8
  columnNameGroups: TMultiLanguageString[][];
9
9
  series: IDataSeries[];
10
10
  };
@@ -1,3 +1,2 @@
1
- import { IDataCell } from "../types/view";
2
- export declare function formatNumericValue(dataCell: IDataCell, locale: string, addThousandSeparator?: boolean): string;
1
+ export declare function formatNumericValue(value: number | null, precision: number, locale: string, addThousandSeparator?: boolean): string;
3
2
  export declare function formatMissingData(missingCode: number | undefined, locale: string, htmlTable?: boolean): string;
@@ -32,6 +32,9 @@ export interface IDataSeries {
32
32
  rowNameGroup: TMultiLanguageString[];
33
33
  series: IDataCell[];
34
34
  }
35
+ export type TSingleSelections = {
36
+ [key: string]: string;
37
+ };
35
38
  export type TValueSelectionAmounts = {
36
39
  [key: string]: number;
37
40
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statisticsfinland/pxvisualizer",
3
- "version": "1.0.8-d.5",
3
+ "version": "1.0.8-t.0",
4
4
  "description": "Component library for visualizing PxGraf data",
5
5
  "main": "./dist/pxv.cjs",
6
6
  "jestSonar": {
@@ -1,31 +0,0 @@
1
- import { IQueryVisualizationResponse } from "../types";
2
- import { IVariableMeta, IVariableValueMeta, TMultiLanguageString } from "../types/queryVisualizationResponse";
3
- import { TVariableSelections } from "../types/variableSelections";
4
- import { IDataCell, IDataSeries } from "../types/view";
5
- export declare class SeriesBuilder {
6
- dataIndex: number;
7
- dataLength: number;
8
- private readonly responseObj;
9
- private readonly coordinates;
10
- private readonly lastIndices;
11
- private readonly indices;
12
- private readonly variableOrder;
13
- private readonly lastCoordinateIndex;
14
- private readonly reverseCumulativeProducts;
15
- private readonly selectedViewContentVariableIndex;
16
- private readonly selectedViewTimeVariableIndex;
17
- private readonly selectedViewMeta;
18
- private rowLength;
19
- private rowAmount;
20
- constructor(responseObj: IQueryVisualizationResponse, selectedValueCodes: TVariableSelections);
21
- private initializeCoordinates;
22
- getViewSeries(): IDataSeries[];
23
- generateRowNameGroup(): TMultiLanguageString[];
24
- next(): boolean;
25
- createDataCell(): IDataCell;
26
- getSelectedView(responseObj: IQueryVisualizationResponse, selectedValueCodes: TVariableSelections): IVariableMeta[];
27
- getVariableOrder(): number[];
28
- generateRCP(variableSizes: number[]): number[];
29
- setCurrentIndex(): void;
30
- getCurrentTimeValue(): IVariableValueMeta | undefined;
31
- }
@@ -1,4 +0,0 @@
1
- import { IVariableMeta, IVariableValueMeta } from "../types/queryVisualizationResponse";
2
- import { TVariableSelections } from "../types/variableSelections";
3
- export declare function getValuesForVariableInView(variable: IVariableMeta, selectedValueCodes: TVariableSelections): IVariableValueMeta[];
4
- export declare function sortVariables(variables: IVariableMeta[], codes: string[]): IVariableMeta[];