@sisense/sdk-ui 0.11.3
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/LICENSE.md +35 -0
- package/README.md +2 -0
- package/dist/alert-box/alert-box.d.ts +6 -0
- package/dist/app/client-application.d.ts +52 -0
- package/dist/app/settings/settings.d.ts +23 -0
- package/dist/app/settings/types/brand.d.ts +1 -0
- package/dist/app/settings/types/deployment-props.d.ts +37 -0
- package/dist/app/settings/types/ecm-props.d.ts +11 -0
- package/dist/app/settings/types/features.d.ts +124 -0
- package/dist/app/settings/types/globalization.d.ts +7 -0
- package/dist/app/settings/types/globals.d.ts +33 -0
- package/dist/app/settings/types/index.d.ts +1 -0
- package/dist/app/settings/types/role-manifest.d.ts +263 -0
- package/dist/app/settings/types/user.d.ts +51 -0
- package/dist/area-chart.d.ts +30 -0
- package/dist/bar-chart.d.ts +29 -0
- package/dist/chart-data/cartesian-data.d.ts +5 -0
- package/dist/chart-data/categorical-data.d.ts +5 -0
- package/dist/chart-data/chart-data-service.d.ts +18 -0
- package/dist/chart-data/filter-and-aggregate-chart-data.d.ts +4 -0
- package/dist/chart-data/indicator-data.d.ts +4 -0
- package/dist/chart-data/scatter-data.d.ts +23 -0
- package/dist/chart-data/series-data-color-service/index.d.ts +3 -0
- package/dist/chart-data/series-data-color-service/legend-color.d.ts +2 -0
- package/dist/chart-data/series-data-color-service/series-data-color-service.d.ts +4 -0
- package/dist/chart-data/series-data-color-service/types.d.ts +143 -0
- package/dist/chart-data/table-data.d.ts +6 -0
- package/dist/chart-data/types.d.ts +80 -0
- package/dist/chart-data/utils.d.ts +7 -0
- package/dist/chart-data-options/coloring/coloring-service.d.ts +22 -0
- package/dist/chart-data-options/coloring/conditional-coloring.d.ts +9 -0
- package/dist/chart-data-options/coloring/consts.d.ts +1 -0
- package/dist/chart-data-options/coloring/index.d.ts +1 -0
- package/dist/chart-data-options/coloring/range-coloring.d.ts +9 -0
- package/dist/chart-data-options/coloring/uniform-coloring.d.ts +4 -0
- package/dist/chart-data-options/translate-data-options.d.ts +7 -0
- package/dist/chart-data-options/types.d.ts +349 -0
- package/dist/chart-data-options/utils.d.ts +11 -0
- package/dist/chart-data-options/validate-data-options.d.ts +21 -0
- package/dist/chart-data-processor/categorical-distribution.d.ts +10 -0
- package/dist/chart-data-processor/data-table-date-period.d.ts +37 -0
- package/dist/chart-data-processor/distribution.d.ts +22 -0
- package/dist/chart-data-processor/row-comparator.d.ts +24 -0
- package/dist/chart-data-processor/table-creators.d.ts +39 -0
- package/dist/chart-data-processor/table-processor.d.ts +93 -0
- package/dist/chart-options-processor/apply-event-handlers.d.ts +49 -0
- package/dist/chart-options-processor/cartesian-chart-options.d.ts +18 -0
- package/dist/chart-options-processor/category-chart-options.d.ts +16 -0
- package/dist/chart-options-processor/chart-options-service.d.ts +253 -0
- package/dist/chart-options-processor/common-highcharts-option-service.d.ts +4 -0
- package/dist/chart-options-processor/defaults/cartesian.d.ts +45 -0
- package/dist/chart-options-processor/plot-bands.d.ts +23 -0
- package/dist/chart-options-processor/scatter-chart-options.d.ts +22 -0
- package/dist/chart-options-processor/style-to-design-options-translator/translate-style-to-design-options.d.ts +4 -0
- package/dist/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +13 -0
- package/dist/chart-options-processor/style-to-design-options-translator/translate-to-indicator-options.d.ts +3 -0
- package/dist/chart-options-processor/subtype-to-design-options.d.ts +97 -0
- package/dist/chart-options-processor/theme-option-service.d.ts +11 -0
- package/dist/chart-options-processor/tooltip.d.ts +29 -0
- package/dist/chart-options-processor/translations/axis-section.d.ts +105 -0
- package/dist/chart-options-processor/translations/base-design-options.d.ts +7 -0
- package/dist/chart-options-processor/translations/design-options.d.ts +118 -0
- package/dist/chart-options-processor/translations/funnel-plot-options.d.ts +53 -0
- package/dist/chart-options-processor/translations/funnel-series.d.ts +15 -0
- package/dist/chart-options-processor/translations/legend-section.d.ts +23 -0
- package/dist/chart-options-processor/translations/marker-section.d.ts +26 -0
- package/dist/chart-options-processor/translations/navigator.d.ts +32 -0
- package/dist/chart-options-processor/translations/number-format-config.d.ts +16 -0
- package/dist/chart-options-processor/translations/pie-plot-options.d.ts +29 -0
- package/dist/chart-options-processor/translations/pie-series.d.ts +19 -0
- package/dist/chart-options-processor/translations/scatter-axis.d.ts +7 -0
- package/dist/chart-options-processor/translations/scatter-plot-options.d.ts +22 -0
- package/dist/chart-options-processor/translations/scatter-series.d.ts +23 -0
- package/dist/chart-options-processor/translations/scatter-tooltip.d.ts +21 -0
- package/dist/chart-options-processor/translations/tooltip-utils.d.ts +39 -0
- package/dist/chart-options-processor/translations/tooltip.d.ts +3 -0
- package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +73 -0
- package/dist/chart-options-processor/translations/treemap/treemap-labels.d.ts +6 -0
- package/dist/chart-options-processor/translations/treemap/treemap-options.d.ts +6 -0
- package/dist/chart-options-processor/translations/treemap/treemap-series.d.ts +5 -0
- package/dist/chart-options-processor/translations/treemap/treemap-tooltip.d.ts +6 -0
- package/dist/chart-options-processor/translations/treemap/types.d.ts +19 -0
- package/dist/chart-options-processor/translations/types.d.ts +36 -0
- package/dist/chart-options-processor/translations/value-label-section.d.ts +28 -0
- package/dist/chart.d.ts +80 -0
- package/dist/charts/indicator/chart/gauge.d.ts +166 -0
- package/dist/charts/indicator/chart/indicator-helper.d.ts +47 -0
- package/dist/charts/indicator/chart/indicator.d.ts +39 -0
- package/dist/charts/indicator/chart/numeric-bar.d.ts +98 -0
- package/dist/charts/indicator/chart/numeric-simple.d.ts +91 -0
- package/dist/charts/indicator/chart/ticker.d.ts +65 -0
- package/dist/charts/indicator/indicator-legacy-chart-data-options.d.ts +36 -0
- package/dist/charts/indicator/indicator-legacy-chart-options/default-options.d.ts +4 -0
- package/dist/charts/indicator/indicator-legacy-chart-options/index.d.ts +1 -0
- package/dist/charts/indicator/indicator-legacy-chart-options/indicator-legacy-chart-options.d.ts +16 -0
- package/dist/charts/indicator/indicator-legacy-chart-options/legacy-chart-options-to-theme-settings-dictionary.d.ts +12 -0
- package/dist/charts/indicator/indicator-legacy-chart-options/override-with-theme-settings.d.ts +3 -0
- package/dist/charts/indicator/indicator-legacy-chart-options/override-with-value-color.d.ts +35 -0
- package/dist/charts/indicator/indicator-legacy-chart-options/utils/override-with-custom-settings.d.ts +22 -0
- package/dist/charts/indicator/types.d.ts +118 -0
- package/dist/charts/table/data-table-wrapper.d.ts +3 -0
- package/dist/charts/table/header/field-type-icon.d.ts +6 -0
- package/dist/charts/table/header/sortable-table-column-header.d.ts +10 -0
- package/dist/charts/table/helpers/calc-column-widths.d.ts +2 -0
- package/dist/charts/table/helpers/format-numbers.d.ts +3 -0
- package/dist/charts/table/helpers/get-cell-styles.d.ts +13 -0
- package/dist/charts/table/index.d.ts +3 -0
- package/dist/charts/table/pure-table.d.ts +8 -0
- package/dist/charts/table/styles/style-constants.d.ts +9 -0
- package/dist/charts/table/types.d.ts +83 -0
- package/dist/column-chart.d.ts +29 -0
- package/dist/dashboard-widget/dashboard-widget.d.ts +16 -0
- package/dist/dashboard-widget/fetch-widget.d.ts +11 -0
- package/dist/dashboard-widget/translate-panel-color-format.d.ts +5 -0
- package/dist/dashboard-widget/translate-widget-data-options.d.ts +7 -0
- package/dist/dashboard-widget/translate-widget-drilldown-options.d.ts +3 -0
- package/dist/dashboard-widget/translate-widget-filters.d.ts +16 -0
- package/dist/dashboard-widget/translate-widget-style-options.d.ts +5 -0
- package/dist/dashboard-widget/translate-widget.d.ts +12 -0
- package/dist/dashboard-widget/types.d.ts +336 -0
- package/dist/dashboard-widget/utils.d.ts +32 -0
- package/dist/decorators/as-sisense-component.d.ts +19 -0
- package/dist/decorators/with-error-boundary.d.ts +5 -0
- package/dist/decorators/with-sisense-context-validation.d.ts +7 -0
- package/dist/decorators/with-tracking/error-tracker.d.ts +20 -0
- package/dist/decorators/with-tracking/index.d.ts +1 -0
- package/dist/decorators/with-tracking/use-track-component-init.d.ts +5 -0
- package/dist/decorators/with-tracking/with-tracking.d.ts +10 -0
- package/dist/dynamic-size-container/default-size.d.ts +14 -0
- package/dist/dynamic-size-container/dynamic-size-container.d.ts +22 -0
- package/dist/dynamic-size-container/index.d.ts +2 -0
- package/dist/error-boundary/error-boundary-box.d.ts +13 -0
- package/dist/error-boundary/error-boundary.d.ts +34 -0
- package/dist/error-boundary/use-set-error.d.ts +2 -0
- package/dist/filters/components/common/buttons.d.ts +10 -0
- package/dist/filters/components/common/checkbox.d.ts +7 -0
- package/dist/filters/components/common/date-range-field-button.d.ts +13 -0
- package/dist/filters/components/common/index.d.ts +5 -0
- package/dist/filters/components/common/input.d.ts +7 -0
- package/dist/filters/components/common/radio.d.ts +6 -0
- package/dist/filters/components/common/switch.d.ts +1 -0
- package/dist/filters/components/date-filter/consts.d.ts +1 -0
- package/dist/filters/components/date-filter/date-filter/calendar-date-selector.d.ts +20 -0
- package/dist/filters/components/date-filter/date-filter/calendar-header.d.ts +12 -0
- package/dist/filters/components/date-filter/date-filter/date-filter.d.ts +61 -0
- package/dist/filters/components/date-filter/date-filter/date-range-calculator.d.ts +8 -0
- package/dist/filters/components/date-filter/date-filter/index.d.ts +1 -0
- package/dist/filters/components/date-filter/date-filter/quick-date-selection-buttons.d.ts +13 -0
- package/dist/filters/components/date-filter/date-filter/styled-date-picker.d.ts +7 -0
- package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +63 -0
- package/dist/filters/components/date-filter/date-range-filter-tile/index.d.ts +1 -0
- package/dist/filters/components/date-filter/date-range-filter-tile/use-date-limits.d.ts +7 -0
- package/dist/filters/components/date-filter/index.d.ts +2 -0
- package/dist/filters/components/date-filter/types.d.ts +14 -0
- package/dist/filters/components/filter-tile.d.ts +14 -0
- package/dist/filters/components/icons/arrow-down-icon.d.ts +2 -0
- package/dist/filters/components/icons/arrow-right-icon.d.ts +2 -0
- package/dist/filters/components/icons/date-icon.d.ts +5 -0
- package/dist/filters/components/icons/double-arrow-right-icon.d.ts +2 -0
- package/dist/filters/components/icons/index.d.ts +7 -0
- package/dist/filters/components/icons/menu-icon.d.ts +2 -0
- package/dist/filters/components/icons/pencil-icon.d.ts +2 -0
- package/dist/filters/components/icons/plus-icon.d.ts +2 -0
- package/dist/filters/components/icons/search-icon.d.ts +2 -0
- package/dist/filters/components/icons/trash-icon.d.ts +2 -0
- package/dist/filters/components/member-filter-tile/basic-member-filter-tile.d.ts +50 -0
- package/dist/filters/components/member-filter-tile/index.d.ts +3 -0
- package/dist/filters/components/member-filter-tile/member-filter-tile.d.ts +46 -0
- package/dist/filters/components/member-filter-tile/member-list.d.ts +11 -0
- package/dist/filters/components/member-filter-tile/members-reducer.d.ts +32 -0
- package/dist/filters/components/member-filter-tile/pill-section.d.ts +9 -0
- package/dist/filters/components/member-filter-tile/use-members.d.ts +14 -0
- package/dist/filters/components/member-filter-tile/use-validate-members.d.ts +8 -0
- package/dist/filters/index.d.ts +2 -0
- package/dist/funnel-chart.d.ts +47 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.js +71761 -0
- package/dist/indicator-canvas.d.ts +21 -0
- package/dist/indicator-chart.d.ts +60 -0
- package/dist/line-chart.d.ts +28 -0
- package/dist/locales/en.d.ts +17 -0
- package/dist/no-results-overlay/images/index.d.ts +2 -0
- package/dist/no-results-overlay/no-results-overlay.d.ts +13 -0
- package/dist/pie-chart.d.ts +28 -0
- package/dist/polar-chart.d.ts +28 -0
- package/dist/props.d.ts +882 -0
- package/dist/query/date-formats/angular-text-date-format-replacers.d.ts +5 -0
- package/dist/query/date-formats/apply-date-format.d.ts +65 -0
- package/dist/query/date-formats/fiscal-date-format-replacers.d.ts +33 -0
- package/dist/query/date-formats/index.d.ts +2 -0
- package/dist/query/date-formats/new-date-format.d.ts +16 -0
- package/dist/query/date-formats/simple-date-format-replacers.d.ts +4 -0
- package/dist/query/execute-query.d.ts +8 -0
- package/dist/query/query-result-date-formatting.d.ts +5 -0
- package/dist/query-execution/execute-query-by-widget-id.d.ts +29 -0
- package/dist/query-execution/execute-query.d.ts +32 -0
- package/dist/query-execution/index.d.ts +5 -0
- package/dist/query-execution/query-state-reducer.d.ts +66 -0
- package/dist/query-execution/use-execute-query-by-widget-id.d.ts +71 -0
- package/dist/query-execution/use-execute-query.d.ts +70 -0
- package/dist/query-execution/utils.d.ts +9 -0
- package/dist/scatter-chart.d.ts +68 -0
- package/dist/sisense-chart.d.ts +23 -0
- package/dist/sisense-context/custom-sisense-context-provider.d.ts +19 -0
- package/dist/sisense-context/sisense-context-provider.d.ts +36 -0
- package/dist/sisense-context/sisense-context.d.ts +9 -0
- package/dist/table/hooks/use-table-data.d.ts +11 -0
- package/dist/table/hooks/use-table-datatable.d.ts +11 -0
- package/dist/table/index.d.ts +1 -0
- package/dist/table/styles/get-custom-pagination-styles.d.ts +10 -0
- package/dist/table/table.d.ts +50 -0
- package/dist/theme-provider/custom-theme-provider.d.ts +18 -0
- package/dist/theme-provider/index.d.ts +1 -0
- package/dist/theme-provider/theme-provider.d.ts +45 -0
- package/dist/theme-provider/use-theme-settings.d.ts +12 -0
- package/dist/themes/legacy-design-settings.d.ts +84 -0
- package/dist/themes/theme-loader.d.ts +14 -0
- package/dist/treemap-chart.d.ts +34 -0
- package/dist/types.d.ts +692 -0
- package/dist/utils/color/color-interpolation.d.ts +37 -0
- package/dist/utils/color/index.d.ts +1 -0
- package/dist/utils/data-limit-warning.d.ts +2 -0
- package/dist/utils/dedupe.d.ts +1 -0
- package/dist/utils/filters-comparator.d.ts +11 -0
- package/dist/utils/utility-types.d.ts +39 -0
- package/dist/vite.svg +1 -0
- package/dist/widgets/chart-widget.d.ts +30 -0
- package/dist/widgets/common/context-menu.d.ts +3 -0
- package/dist/widgets/common/custom-drilldown.d.ts +20 -0
- package/dist/widgets/common/drilldown-breadcrumbs/drilldown-breadcrumbs.d.ts +4 -0
- package/dist/widgets/common/drilldown-breadcrumbs/index.d.ts +1 -0
- package/dist/widgets/common/drilldown-breadcrumbs/use-buttons.d.ts +27 -0
- package/dist/widgets/common/drilldown-breadcrumbs/use-popper.d.ts +24 -0
- package/dist/widgets/common/drilldown-breadcrumbs/use-theme-for-breadcrumbs.d.ts +11 -0
- package/dist/widgets/common/drilldown.d.ts +32 -0
- package/dist/widgets/common/use-widget-drilldown.d.ts +2 -0
- package/dist/widgets/common/widget-header.d.ts +11 -0
- package/dist/widgets/common/widget-style-utils.d.ts +13 -0
- package/dist/widgets/drilldown-widget.d.ts +49 -0
- package/dist/widgets/table-widget.d.ts +23 -0
- package/package.json +110 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChartDesignOptions } from './translations/types';
|
|
2
|
+
import { ChartType, OptionsWithAlerts, CompleteThemeSettings } from '../types';
|
|
3
|
+
import { CategoricalChartData } from '../chart-data/types';
|
|
4
|
+
import { HighchartsOptionsInternal } from './chart-options-service';
|
|
5
|
+
import { ChartDataOptionsInternal } from '../chart-data-options/types';
|
|
6
|
+
/**
|
|
7
|
+
* Convert intermediate chart data, data options, and design options
|
|
8
|
+
* into pure highcharts config data.
|
|
9
|
+
*
|
|
10
|
+
* @param chartData - the data for the chart in an intermediate format
|
|
11
|
+
* @param chartType -
|
|
12
|
+
* @param chartDesignOptions -
|
|
13
|
+
* @param dataOptions -
|
|
14
|
+
* @param themeSettings -
|
|
15
|
+
*/
|
|
16
|
+
export declare const getCategoricalChartOptions: (chartData: CategoricalChartData, chartType: ChartType, chartDesignOptions: ChartDesignOptions, dataOptions: ChartDataOptionsInternal, themeSettings?: CompleteThemeSettings) => OptionsWithAlerts<HighchartsOptionsInternal>;
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import type { Options, DrilldownOptions } from '@sisense/sisense-charts';
|
|
2
|
+
import { ChartData } from '../chart-data/types';
|
|
3
|
+
import { ChartDesignOptions } from './translations/types';
|
|
4
|
+
import { LegendSettings } from './translations/legend-section';
|
|
5
|
+
import { ValueLabelSettings } from './translations/value-label-section';
|
|
6
|
+
import { MarkerSettings } from './translations/marker-section';
|
|
7
|
+
import { AxisSettings } from './translations/axis-section';
|
|
8
|
+
import { HighchartsType, HighchartsSeriesValues } from './translations/translations-to-highcharts';
|
|
9
|
+
import { TooltipSettings } from './tooltip';
|
|
10
|
+
import { PieOptions } from './translations/pie-plot-options';
|
|
11
|
+
import { FunnelOptions } from './translations/funnel-plot-options';
|
|
12
|
+
import { ChartType, OptionsWithAlerts, CompleteThemeSettings } from '../types';
|
|
13
|
+
import { ChartDataOptionsInternal } from '../chart-data-options/types';
|
|
14
|
+
import { ScatterBubbleOptions } from './translations/scatter-plot-options';
|
|
15
|
+
/**
|
|
16
|
+
* Highcharts options
|
|
17
|
+
*
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export type HighchartsOptions = Pick<Options, keyof Options>;
|
|
21
|
+
/**
|
|
22
|
+
* Convert intermediate chart data, data options, and design options
|
|
23
|
+
* into pure highcharts config data.
|
|
24
|
+
*
|
|
25
|
+
* @param chartData - the data for the chart in an intermediate format
|
|
26
|
+
* @param chartType -
|
|
27
|
+
* @param chartDesignOptions -
|
|
28
|
+
* @param dataOptions -
|
|
29
|
+
* @param themeSettings -
|
|
30
|
+
* @param dateFormatter
|
|
31
|
+
*/
|
|
32
|
+
export declare const highchartsOptionsService: (chartData: ChartData, chartType: ChartType, chartDesignOptions: ChartDesignOptions, dataOptions: ChartDataOptionsInternal, themeSettings?: CompleteThemeSettings, dateFormatter?: ((date: Date, format: string) => string) | undefined) => OptionsWithAlerts<HighchartsOptionsInternal>;
|
|
33
|
+
export declare const colorChineseSilver = "#CCCCCC";
|
|
34
|
+
export declare const colorWhite = "#FFFFFF";
|
|
35
|
+
export declare const DEFAULT_SERIES_COLORS: string[];
|
|
36
|
+
export type SeriesType = HighchartsSeriesValues & {
|
|
37
|
+
index?: number;
|
|
38
|
+
animation?: boolean;
|
|
39
|
+
showInNavigator?: boolean;
|
|
40
|
+
showInLegend?: boolean;
|
|
41
|
+
stickyTracking?: boolean;
|
|
42
|
+
boostThreshold?: number;
|
|
43
|
+
turboThreshold?: number;
|
|
44
|
+
color?: string;
|
|
45
|
+
yAxis?: number;
|
|
46
|
+
marker?: MarkerSettings;
|
|
47
|
+
type?: string;
|
|
48
|
+
id?: string;
|
|
49
|
+
};
|
|
50
|
+
type ChartPlotOptions = {
|
|
51
|
+
dataLabels?: ValueLabelSettings;
|
|
52
|
+
groupPadding?: number;
|
|
53
|
+
pointPadding?: number;
|
|
54
|
+
pointPlacement?: null;
|
|
55
|
+
animation?: boolean;
|
|
56
|
+
shadow: boolean;
|
|
57
|
+
marker?: MarkerSettings;
|
|
58
|
+
borderWidth?: number;
|
|
59
|
+
};
|
|
60
|
+
export type Stacking = 'normal' | 'percent';
|
|
61
|
+
export type PlotOptions = {
|
|
62
|
+
series: {
|
|
63
|
+
lineWidth?: number;
|
|
64
|
+
dataLabels?: ValueLabelSettings;
|
|
65
|
+
marker?: MarkerSettings;
|
|
66
|
+
stacking?: Stacking;
|
|
67
|
+
stickyTracking?: boolean;
|
|
68
|
+
groupPadding?: number;
|
|
69
|
+
pointPadding?: number;
|
|
70
|
+
grouping?: boolean;
|
|
71
|
+
states?: {
|
|
72
|
+
select?: {
|
|
73
|
+
color?: string | null;
|
|
74
|
+
opacity?: number;
|
|
75
|
+
borderColor?: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
allowPointSelect?: boolean;
|
|
79
|
+
boostThreshold?: number;
|
|
80
|
+
turboThreshold?: number;
|
|
81
|
+
fillOpacity?: number;
|
|
82
|
+
connectNulls?: boolean;
|
|
83
|
+
animation?: {
|
|
84
|
+
duration?: number;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
line?: ChartPlotOptions;
|
|
88
|
+
area?: ChartPlotOptions;
|
|
89
|
+
bar?: ChartPlotOptions;
|
|
90
|
+
column?: ChartPlotOptions;
|
|
91
|
+
pie?: PieOptions;
|
|
92
|
+
funnel?: FunnelOptions;
|
|
93
|
+
bubble?: ScatterBubbleOptions;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Highcharts options internal
|
|
97
|
+
*/
|
|
98
|
+
export type HighchartsOptionsInternal = {
|
|
99
|
+
chart: {
|
|
100
|
+
type: HighchartsType;
|
|
101
|
+
renderTo?: string;
|
|
102
|
+
events?: {
|
|
103
|
+
load?: () => void;
|
|
104
|
+
redraw?: () => void;
|
|
105
|
+
};
|
|
106
|
+
spacing?: number[];
|
|
107
|
+
marginTop?: number;
|
|
108
|
+
alignTicks?: boolean;
|
|
109
|
+
polar: boolean;
|
|
110
|
+
animation?: {
|
|
111
|
+
duration?: number;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
title?: {
|
|
115
|
+
text: string | null;
|
|
116
|
+
};
|
|
117
|
+
subtitle?: {
|
|
118
|
+
text: string | null;
|
|
119
|
+
};
|
|
120
|
+
series: SeriesType[];
|
|
121
|
+
xAxis?: AxisSettings[];
|
|
122
|
+
yAxis?: AxisSettings[];
|
|
123
|
+
legend?: LegendSettings;
|
|
124
|
+
plotOptions?: PlotOptions;
|
|
125
|
+
navigator?: Navigator | {
|
|
126
|
+
enabled: boolean;
|
|
127
|
+
};
|
|
128
|
+
tooltip?: TooltipSettings;
|
|
129
|
+
boost?: {
|
|
130
|
+
useGPUTranslations: boolean;
|
|
131
|
+
usePreAllocated: boolean;
|
|
132
|
+
};
|
|
133
|
+
credits?: {
|
|
134
|
+
enabled: boolean;
|
|
135
|
+
};
|
|
136
|
+
exporting?: {
|
|
137
|
+
enabled: boolean;
|
|
138
|
+
};
|
|
139
|
+
drilldown?: DrilldownOptions;
|
|
140
|
+
};
|
|
141
|
+
export type Style = {
|
|
142
|
+
fontFamily?: string;
|
|
143
|
+
fontSize?: string;
|
|
144
|
+
fontWeight?: string;
|
|
145
|
+
color?: string;
|
|
146
|
+
textOutline?: string;
|
|
147
|
+
pointerEvents?: string;
|
|
148
|
+
textOverflow?: string;
|
|
149
|
+
width?: string;
|
|
150
|
+
};
|
|
151
|
+
type Navigator = {
|
|
152
|
+
series: {
|
|
153
|
+
type: HighchartsType;
|
|
154
|
+
dataGrouping: {
|
|
155
|
+
enabled: boolean;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
enabled: boolean;
|
|
159
|
+
margin: number;
|
|
160
|
+
height: number;
|
|
161
|
+
xAxis: AxisSettings;
|
|
162
|
+
handles: {
|
|
163
|
+
symbols: string[];
|
|
164
|
+
backgroundColor: string;
|
|
165
|
+
borderColor: string;
|
|
166
|
+
};
|
|
167
|
+
maskInside: boolean;
|
|
168
|
+
maskFill: string;
|
|
169
|
+
outlineColor: string;
|
|
170
|
+
outlineWidth: number;
|
|
171
|
+
threshold?: number;
|
|
172
|
+
tooltipFormatter?: (min: number, max: number) => {
|
|
173
|
+
left: string;
|
|
174
|
+
right: string;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
declare const DEFAULT_STYLE_OPTIONS: {
|
|
178
|
+
readonly legend: {
|
|
179
|
+
readonly enabled: true;
|
|
180
|
+
readonly position: "bottom";
|
|
181
|
+
};
|
|
182
|
+
readonly navigator: {
|
|
183
|
+
readonly enabled: true;
|
|
184
|
+
};
|
|
185
|
+
readonly markers: {
|
|
186
|
+
readonly enabled: true;
|
|
187
|
+
readonly fill: "hollow";
|
|
188
|
+
readonly size: "small";
|
|
189
|
+
};
|
|
190
|
+
readonly seriesLabels: {
|
|
191
|
+
readonly enabled: false;
|
|
192
|
+
readonly rotation: 0;
|
|
193
|
+
};
|
|
194
|
+
readonly xAxis: {
|
|
195
|
+
readonly enabled: true;
|
|
196
|
+
readonly gridLines: true;
|
|
197
|
+
readonly isIntervalEnabled: false;
|
|
198
|
+
readonly labels: {
|
|
199
|
+
readonly enabled: true;
|
|
200
|
+
};
|
|
201
|
+
readonly logarithmic: false;
|
|
202
|
+
readonly title: {
|
|
203
|
+
readonly enabled: false;
|
|
204
|
+
readonly text: "X Axis title";
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
readonly yAxis: {
|
|
208
|
+
readonly enabled: true;
|
|
209
|
+
readonly gridLines: true;
|
|
210
|
+
readonly isIntervalEnabled: false;
|
|
211
|
+
readonly labels: {
|
|
212
|
+
readonly enabled: true;
|
|
213
|
+
};
|
|
214
|
+
readonly logarithmic: false;
|
|
215
|
+
readonly title: {
|
|
216
|
+
readonly enabled: false;
|
|
217
|
+
readonly text: "Y Axis title";
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
readonly y2Axis: {
|
|
221
|
+
readonly enabled: false;
|
|
222
|
+
readonly gridLines: true;
|
|
223
|
+
readonly isIntervalEnabled: false;
|
|
224
|
+
readonly labels: {
|
|
225
|
+
readonly enabled: true;
|
|
226
|
+
};
|
|
227
|
+
readonly logarithmic: false;
|
|
228
|
+
readonly title: {
|
|
229
|
+
readonly enabled: false;
|
|
230
|
+
readonly text: "Y2 Axis title";
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
readonly convolution: {
|
|
234
|
+
readonly enabled: false;
|
|
235
|
+
readonly selectedConvolutionType: "byPercentage";
|
|
236
|
+
readonly minimalIndependentSlicePercentage: 3;
|
|
237
|
+
readonly independentSlicesCount: 7;
|
|
238
|
+
};
|
|
239
|
+
readonly labels: {
|
|
240
|
+
readonly categories: true;
|
|
241
|
+
readonly enabled: true;
|
|
242
|
+
readonly percent: true;
|
|
243
|
+
readonly decimals: false;
|
|
244
|
+
readonly value: false;
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* Returns default style options, which can be used as base for custom style options.
|
|
249
|
+
*
|
|
250
|
+
* @returns Style options object
|
|
251
|
+
*/
|
|
252
|
+
export declare const getDefaultStyleOptions: () => typeof DEFAULT_STYLE_OPTIONS;
|
|
253
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { HighchartsOptionsInternal } from './chart-options-service';
|
|
2
|
+
export declare const DEFAULT_ANIMATION_DURATION_MS_INIT = 600;
|
|
3
|
+
export declare const DEFAULT_ANIMATION_DURATION_MS_UPDATE = 300;
|
|
4
|
+
export declare const applyCommonHighchartsOptions: (chartOptions: HighchartsOptionsInternal) => HighchartsOptionsInternal;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { AxisSettings } from '../translations/axis-section';
|
|
2
|
+
import { Style, HighchartsOptionsInternal, Stacking } from '../chart-options-service';
|
|
3
|
+
import { ChartType } from '../../types';
|
|
4
|
+
import { PolarType } from '../translations/design-options';
|
|
5
|
+
export declare const lineColorDefault = "#d1d1d7";
|
|
6
|
+
export declare const fontStyleDefault: Style;
|
|
7
|
+
export declare const stackTotalFontStyleDefault: Style;
|
|
8
|
+
export declare const xAxisDefaults: AxisSettings;
|
|
9
|
+
export declare const yAxisDefaults: AxisSettings;
|
|
10
|
+
export declare const chartOptionsDefaults: (chartType: ChartType, polarType?: PolarType, stacking?: Stacking) => HighchartsOptionsInternal;
|
|
11
|
+
export declare const cartesianDefaults: HighchartsOptionsInternal;
|
|
12
|
+
export declare const areaDefaults: (stacking?: Stacking) => {
|
|
13
|
+
plotOptions: {
|
|
14
|
+
area: {
|
|
15
|
+
lineColor?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
series: {
|
|
18
|
+
stacking?: Stacking | undefined;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export declare const columnDefaults: (stacking?: Stacking) => {
|
|
23
|
+
plotOptions: {
|
|
24
|
+
column: {
|
|
25
|
+
borderWidth?: number | undefined;
|
|
26
|
+
groupPadding: number;
|
|
27
|
+
pointPadding: number;
|
|
28
|
+
};
|
|
29
|
+
series: {
|
|
30
|
+
stacking?: Stacking | undefined;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export declare const barDefaults: (stacking?: Stacking) => {
|
|
35
|
+
plotOptions: {
|
|
36
|
+
bar: {
|
|
37
|
+
borderWidth?: number | undefined;
|
|
38
|
+
groupPadding: number;
|
|
39
|
+
pointPadding: number;
|
|
40
|
+
};
|
|
41
|
+
series: {
|
|
42
|
+
stacking?: Stacking | undefined;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CartesianChartDataOptionsInternal, ChartDataOptionsInternal } from '../chart-data-options/types';
|
|
2
|
+
import { ChartData } from '../chart-data/types';
|
|
3
|
+
import { PlotBand } from './translations/axis-section';
|
|
4
|
+
import { ChartDesignOptions } from './translations/types';
|
|
5
|
+
type CategoryIndexMapPlotBands = {
|
|
6
|
+
categories: string[];
|
|
7
|
+
indexMap: number[];
|
|
8
|
+
plotBands: PlotBand[];
|
|
9
|
+
};
|
|
10
|
+
export declare const applyNumberFormatToPlotBands: (chartDataOptions: ChartDataOptionsInternal, categoryIndexMapPlotBands: CategoryIndexMapPlotBands) => CategoryIndexMapPlotBands;
|
|
11
|
+
/**
|
|
12
|
+
* This method returns three arrays to create chart options
|
|
13
|
+
* categories - values to display on the bottom X1 axis
|
|
14
|
+
* indexMap - tic index to xValue index
|
|
15
|
+
* plotBands - information to create plot bands for X2 axis
|
|
16
|
+
*
|
|
17
|
+
* @param data -
|
|
18
|
+
* @param dataOptions -
|
|
19
|
+
* @param designOptions -
|
|
20
|
+
* @param continuousDatetimeXAxis -
|
|
21
|
+
*/
|
|
22
|
+
export declare const getCategoriesIndexMapAndPlotBands: (data: ChartData, dataOptions: CartesianChartDataOptionsInternal, designOptions: ChartDesignOptions, continuousDatetimeXAxis: boolean) => CategoryIndexMapPlotBands;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ChartDesignOptions } from './translations/types';
|
|
2
|
+
import { ChartType, OptionsWithAlerts, CompleteThemeSettings } from '../types';
|
|
3
|
+
import { ScatterChartData } from '../chart-data/types';
|
|
4
|
+
import { HighchartsOptionsInternal } from './chart-options-service';
|
|
5
|
+
import { ChartDataOptionsInternal } from '../chart-data-options/types';
|
|
6
|
+
import { LegendPosition, LegendSettings } from './translations/legend-section';
|
|
7
|
+
/**
|
|
8
|
+
* @param position
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare const getScatterLegendSettings: (position: LegendPosition) => LegendSettings;
|
|
12
|
+
/**
|
|
13
|
+
* Convert intermediate chart data, data options, and design options
|
|
14
|
+
* into pure highcharts config data.
|
|
15
|
+
*
|
|
16
|
+
* @param chartData - the data for the chart in an intermediate format
|
|
17
|
+
* @param chartType -
|
|
18
|
+
* @param chartDesignOptions -
|
|
19
|
+
* @param dataOptions -
|
|
20
|
+
* @param themeSettings -
|
|
21
|
+
*/
|
|
22
|
+
export declare const getScatterChartOptions: (chartData: ScatterChartData, chartType: ChartType, chartDesignOptions: ChartDesignOptions, dataOptions: ChartDataOptionsInternal, themeSettings?: CompleteThemeSettings) => OptionsWithAlerts<HighchartsOptionsInternal>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ChartType, StyleOptions } from '../../types';
|
|
2
|
+
import { ChartDesignOptions } from '../translations/types';
|
|
3
|
+
import { ChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
4
|
+
export declare const translateStyleOptionsToDesignOptions: (chartType: ChartType, styleOptions: StyleOptions, dataOptions: ChartDataOptionsInternal) => ChartDesignOptions;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, TreemapStyleOptions } from '../../types';
|
|
2
|
+
import { StackableChartDesignOptions, LineChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, AreaChartDesignOptions, TreemapChartDesignOptions } from '../translations/design-options';
|
|
3
|
+
import { StackType } from '../translations/translations-to-highcharts';
|
|
4
|
+
export declare const DefaultStackType: StackType;
|
|
5
|
+
export declare const getStackableChartDesignOptions: (styleOptions: AreaStyleOptions | StackableStyleOptions, hasY2Axis: boolean) => StackableChartDesignOptions;
|
|
6
|
+
export declare const getLineChartDesignOptions: (styleOptions: LineStyleOptions, hasY2Axis: boolean) => LineChartDesignOptions;
|
|
7
|
+
export declare const getAreaChartDesignOptions: (styleOptions: AreaStyleOptions, hasY2Axis: boolean) => AreaChartDesignOptions;
|
|
8
|
+
export declare const DefaultPieType = "classic";
|
|
9
|
+
export declare const getPieChartDesignOptions: (styleOptions: PieStyleOptions) => PieChartDesignOptions;
|
|
10
|
+
export declare const getFunnelChartDesignOptions: (styleOptions: FunnelStyleOptions) => FunnelChartDesignOptions;
|
|
11
|
+
export declare const getTreemapChartDesignOptions: (styleOptions: TreemapStyleOptions) => TreemapChartDesignOptions;
|
|
12
|
+
export declare const getPolarChartDesignOptions: (styleOptions: PolarStyleOptions) => PolarChartDesignOptions;
|
|
13
|
+
export declare const getScatterChartDesignOptions: (styleOptions: ScatterStyleOptions) => ScatterChartDesignOptions;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { LineType, StackType } from './translations/translations-to-highcharts';
|
|
2
|
+
import { IndicatorStyleType, PolarType } from './translations/design-options';
|
|
3
|
+
/**
|
|
4
|
+
* Property of {@link LineStyleOptions}
|
|
5
|
+
*
|
|
6
|
+
* Subtype of {@link LineChart}
|
|
7
|
+
*
|
|
8
|
+
* **Values**
|
|
9
|
+
*
|
|
10
|
+
* - `line/spline` - curved line from point to point.
|
|
11
|
+
* - `line/basic` - straight line from point to point.
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export type LineSubtype = 'line/spline' | 'line/basic';
|
|
15
|
+
/**
|
|
16
|
+
* Property of {@link AreaStyleOptions}
|
|
17
|
+
*
|
|
18
|
+
* Subtype of {@link AreaChart}
|
|
19
|
+
*
|
|
20
|
+
* **Values**
|
|
21
|
+
*
|
|
22
|
+
* - `area/basic` - straight lines showing areas that overlap so that smaller areas appear on top of larger areas and cover them.
|
|
23
|
+
* - `area/stacked` - straight lines showing areas that are stacked on top of each other and do not overlap.
|
|
24
|
+
* - `area/stacked100` - straight lines showing areas that are stacked on top of each other but do not overlap so that the combined area is stretched to the top representing 100%.
|
|
25
|
+
* - `area/spline` - curved lines showing areas that overlap so that smaller areas appear on top of larger areas and cover them.
|
|
26
|
+
* - `area/stackedspline` - curved lines showing areas that are stacked on top of each other and do not overlap.
|
|
27
|
+
* - `area/stackedspline100` - curved lines showing areas that are stacked on top of each other but do not overlap so that the combined area is stretched to the top representing 100%.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
export type AreaSubtype = 'area/basic' | 'area/stacked' | 'area/stacked100' | 'area/spline' | 'area/stackedspline' | 'area/stackedspline100';
|
|
31
|
+
/**
|
|
32
|
+
* Property of {@link StackableSubtype}
|
|
33
|
+
*
|
|
34
|
+
* Subtype of {@link BarChart}
|
|
35
|
+
*
|
|
36
|
+
* **Values**
|
|
37
|
+
* - `bar/classic` - y axis values displayed vertically.
|
|
38
|
+
* - `bar/stacked` - y axis values are stacked next to each other and do not overlap.
|
|
39
|
+
* - `bar/stacked100` - y axis values are stacked next to each other but do not overlap and combined and stretched to represent 100%.
|
|
40
|
+
* - `column/classic` - columns are displayed side by side.
|
|
41
|
+
* - `column/stackedcolumn` - columns are stacked on top of each other and do not overlap.
|
|
42
|
+
* - `column/stackedcolumn100` - columns are stacked on top of each other but do not overlap and combined and stretched to represent 100%.
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
export type StackableSubtype = 'bar/classic' | 'bar/stacked' | 'bar/stacked100' | 'column/classic' | 'column/stackedcolumn' | 'column/stackedcolumn100';
|
|
46
|
+
/**
|
|
47
|
+
* Property of {@link PieStyleOptions}
|
|
48
|
+
*
|
|
49
|
+
* Subtype of {@link PieChart}
|
|
50
|
+
*
|
|
51
|
+
* **Values**
|
|
52
|
+
*
|
|
53
|
+
* - `pie/classic` - a circle divided into a series of segments where each segment represents a particular category.
|
|
54
|
+
* - `pie/donut` - a circle divided into a series of segments where each segment represents a particular category with its center cut out to look like a donut.
|
|
55
|
+
* - `pie/ring` - a circle divided into a series of segments where each segment represents a particular category with its center cut out to look like a ring.
|
|
56
|
+
*
|
|
57
|
+
*/
|
|
58
|
+
export type PieSubtype = 'pie/classic' | 'pie/donut' | 'pie/ring';
|
|
59
|
+
/**
|
|
60
|
+
* Property of {@link PolarStyleOptions}
|
|
61
|
+
*
|
|
62
|
+
* Subtype of {@link PolarChart}
|
|
63
|
+
*
|
|
64
|
+
* **Values**
|
|
65
|
+
*
|
|
66
|
+
* - `polar/column` - a chart where data points are displayed using the angle and distance from the center point.
|
|
67
|
+
* - `polar/area` - a chart in which the data points are connected by a line with the area below the line filled.
|
|
68
|
+
* - `polar/line` - a chart in which the data points are connected by a line.
|
|
69
|
+
*/
|
|
70
|
+
export type PolarSubtype = 'polar/column' | 'polar/area' | 'polar/line';
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* Subtype of {@link IndicatorChart}
|
|
74
|
+
*
|
|
75
|
+
* **Values**
|
|
76
|
+
*
|
|
77
|
+
* - `indicator/numeric` - a numeric value representing a value.
|
|
78
|
+
* - `indicator/gauge` - a gauge representing a value between the min and the max.
|
|
79
|
+
*/
|
|
80
|
+
export type IndicatorSubtype = 'indicator/numeric' | 'indicator/gauge';
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* Subtype of {@link TreemapChart}
|
|
84
|
+
*
|
|
85
|
+
* **Values**
|
|
86
|
+
*
|
|
87
|
+
* - `treemap` - default treemap.
|
|
88
|
+
*/
|
|
89
|
+
export type TreemapSubtype = 'treemap';
|
|
90
|
+
export type ChartSubtype = LineSubtype | AreaSubtype | StackableSubtype | PieSubtype | PolarSubtype | IndicatorSubtype | TreemapSubtype;
|
|
91
|
+
export declare const chartSubtypeToDesignOptions: Readonly<Record<ChartSubtype, {
|
|
92
|
+
lineType?: LineType | undefined;
|
|
93
|
+
stackType?: StackType | undefined;
|
|
94
|
+
pieType?: "classic" | "donut" | "ring" | undefined;
|
|
95
|
+
polarType?: PolarType | undefined;
|
|
96
|
+
indicatorType?: IndicatorStyleType | undefined;
|
|
97
|
+
}>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CompleteThemeSettings } from '../types';
|
|
2
|
+
import { HighchartsOptionsInternal } from './chart-options-service';
|
|
3
|
+
export declare const applyThemeToChart: (chartOptions: HighchartsOptionsInternal, themeSettings?: CompleteThemeSettings) => HighchartsOptionsInternal;
|
|
4
|
+
/**
|
|
5
|
+
* Returns default theme settings, which can be used as base for custom theme options.
|
|
6
|
+
*
|
|
7
|
+
* @returns Theme settings object
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare const getDefaultThemeSettings: () => CompleteThemeSettings;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ChartDataOptionsInternal } from '../chart-data-options/types';
|
|
2
|
+
import { TooltipOptions } from '@sisense/sisense-charts';
|
|
3
|
+
export type TooltipSettings = TooltipOptions;
|
|
4
|
+
export type InternalSeriesNode = {
|
|
5
|
+
val: number;
|
|
6
|
+
name: string;
|
|
7
|
+
parentNode?: InternalSeriesNode;
|
|
8
|
+
};
|
|
9
|
+
export type InternalSeries = {
|
|
10
|
+
series: {
|
|
11
|
+
name: string;
|
|
12
|
+
color: string;
|
|
13
|
+
};
|
|
14
|
+
x: string;
|
|
15
|
+
y: number;
|
|
16
|
+
point: {
|
|
17
|
+
name: string;
|
|
18
|
+
color: string;
|
|
19
|
+
custom?: {
|
|
20
|
+
number1?: number;
|
|
21
|
+
string1?: string;
|
|
22
|
+
xDisplayValue?: string;
|
|
23
|
+
};
|
|
24
|
+
node?: InternalSeriesNode;
|
|
25
|
+
};
|
|
26
|
+
percentage?: number;
|
|
27
|
+
color?: string;
|
|
28
|
+
};
|
|
29
|
+
export declare const getTooltipSettings: (showDecimals: boolean | undefined, chartDataOptions: ChartDataOptionsInternal) => TooltipSettings;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { Style } from '../chart-options-service';
|
|
2
|
+
import { ChartDataOptionsInternal, Category } from '../../chart-data-options/types';
|
|
3
|
+
import { ChartType } from '../../types';
|
|
4
|
+
import { CategoricalXValues } from '../../chart-data/types';
|
|
5
|
+
export type Axis = {
|
|
6
|
+
enabled?: boolean;
|
|
7
|
+
titleEnabled?: boolean;
|
|
8
|
+
title?: string | null;
|
|
9
|
+
gridLine?: boolean;
|
|
10
|
+
labels?: boolean;
|
|
11
|
+
type?: 'linear' | 'logarithmic';
|
|
12
|
+
min?: number | null;
|
|
13
|
+
max?: number | null;
|
|
14
|
+
tickInterval?: number | null;
|
|
15
|
+
};
|
|
16
|
+
export type AxisMinMax = {
|
|
17
|
+
min: number;
|
|
18
|
+
max: number;
|
|
19
|
+
};
|
|
20
|
+
export type AxisOrientation = 'horizontal' | 'vertical';
|
|
21
|
+
interface AxisLabelsFormatterContextObject {
|
|
22
|
+
value: string | number;
|
|
23
|
+
axis: {
|
|
24
|
+
categories: (string | number)[];
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export type AxisSettings = {
|
|
28
|
+
type?: 'linear' | 'logarithmic';
|
|
29
|
+
title?: {
|
|
30
|
+
text?: string | null;
|
|
31
|
+
enabled?: boolean;
|
|
32
|
+
margin?: number;
|
|
33
|
+
style?: Style;
|
|
34
|
+
};
|
|
35
|
+
gridLineDashStyle?: 'Dot';
|
|
36
|
+
gridLineWidth?: number;
|
|
37
|
+
gridLineColor?: string;
|
|
38
|
+
tickWidth?: number;
|
|
39
|
+
lineColor?: string;
|
|
40
|
+
lineWidth?: number;
|
|
41
|
+
labels?: {
|
|
42
|
+
overflow?: 'none' | 'justify';
|
|
43
|
+
enabled?: boolean;
|
|
44
|
+
autoRotation?: number[];
|
|
45
|
+
style?: Style;
|
|
46
|
+
rotation?: number;
|
|
47
|
+
formatter?: (this: AxisLabelsFormatterContextObject) => string;
|
|
48
|
+
};
|
|
49
|
+
min?: number | null;
|
|
50
|
+
max?: number | null;
|
|
51
|
+
minPadding?: number;
|
|
52
|
+
maxPadding?: number;
|
|
53
|
+
tickInterval?: number | null;
|
|
54
|
+
categories?: string[];
|
|
55
|
+
opposite?: boolean;
|
|
56
|
+
plotBands?: AxisPlotBand[];
|
|
57
|
+
plotLines?: AxisPlotLine[];
|
|
58
|
+
tickmarkPlacement?: string;
|
|
59
|
+
minorGridLineWidth?: number;
|
|
60
|
+
minorTickWidth?: number;
|
|
61
|
+
startOnTick?: boolean;
|
|
62
|
+
endOnTick?: boolean;
|
|
63
|
+
tickColor?: string;
|
|
64
|
+
tickLength?: number;
|
|
65
|
+
minorTickColor?: string;
|
|
66
|
+
minorTickLength?: number;
|
|
67
|
+
minorGridLineColor?: string;
|
|
68
|
+
minorGridLineDashStyle?: string;
|
|
69
|
+
stackLabels?: StackLabel;
|
|
70
|
+
showLastLabel?: boolean;
|
|
71
|
+
};
|
|
72
|
+
export type StackLabel = {
|
|
73
|
+
style: Style;
|
|
74
|
+
crop: boolean;
|
|
75
|
+
allowOverlap: boolean;
|
|
76
|
+
enabled: boolean;
|
|
77
|
+
rotation: number;
|
|
78
|
+
labelrank: number;
|
|
79
|
+
};
|
|
80
|
+
export type PlotBand = {
|
|
81
|
+
text: string;
|
|
82
|
+
from: number;
|
|
83
|
+
to: number;
|
|
84
|
+
};
|
|
85
|
+
export type AxisPlotLine = {
|
|
86
|
+
color: string;
|
|
87
|
+
dashStyle: string;
|
|
88
|
+
width: number;
|
|
89
|
+
value: number;
|
|
90
|
+
};
|
|
91
|
+
export type AxisPlotBand = {
|
|
92
|
+
isPlotBand: boolean;
|
|
93
|
+
from: number;
|
|
94
|
+
to: number;
|
|
95
|
+
label: {
|
|
96
|
+
text: string;
|
|
97
|
+
y: number;
|
|
98
|
+
style?: Style;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
export declare const getCategoricalCompareValue: (value: CategoricalXValues) => number;
|
|
102
|
+
export declare const getXAxisDatetimeSettings: (axis: Axis, category: Category, values: number[], dateFormatter?: ((date: Date, format: string) => string) | undefined) => AxisSettings[];
|
|
103
|
+
export declare const getXAxisSettings: (axis: Axis, axis2: Axis | undefined, categories: string[], plotBands: PlotBand[], xAxisOrientation: AxisOrientation, chartDataOptions: ChartDataOptionsInternal, chartType: ChartType) => AxisSettings[];
|
|
104
|
+
export declare const getYAxisSettings: (axis: Axis, axis2: Axis | undefined, axisMinMax: AxisMinMax, axis2MinMax: AxisMinMax, showTotal: boolean, chartDataOptions: ChartDataOptionsInternal) => AxisSettings[];
|
|
105
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ChartDesignOptions } from './types';
|
|
2
|
+
import { Merge } from '../../utils/utility-types';
|
|
3
|
+
export declare const SERIES_CAPACITY = 50;
|
|
4
|
+
export declare const SCATTER_CATEGORIES_CAPACITY = 500;
|
|
5
|
+
export declare const CATEGORIES_CAPACITY = 100000;
|
|
6
|
+
export declare const BaseDesignOptions: Merge<ChartDesignOptions>;
|
|
7
|
+
export declare const BaseDesignOptionsMultipleAxis: ChartDesignOptions;
|