@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
package/dist/chart.d.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ChartProps } from './props';
|
|
3
|
+
/** Function to check if we should wait for sisense context for rendering the chart */
|
|
4
|
+
export declare const shouldSkipSisenseContextWaiting: (props: ChartProps) => boolean;
|
|
5
|
+
/**
|
|
6
|
+
* A React component used for easily switching chart types or rendering multiple series of different chart types.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* (1) An example of using the `Chart` component to
|
|
10
|
+
* plot a column chart of the Sample ECommerce data source hosted in a Sisense instance:
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <Chart
|
|
13
|
+
* chartType={'column'}
|
|
14
|
+
* dataSet={DM.DataSource}
|
|
15
|
+
* dataOptions={{
|
|
16
|
+
* category: [DM.Commerce.AgeRange],
|
|
17
|
+
* value: [measures.sum(DM.Commerce.Revenue)],
|
|
18
|
+
* breakBy: [DM.Commerce.Gender],
|
|
19
|
+
* }}
|
|
20
|
+
* filters={[filters.members(DM.Commerce.Gender,['Female', 'Male'])]}
|
|
21
|
+
* onDataPointClick= {(point, nativeEvent) => { console.log('clicked', point, nativeEvent); }}
|
|
22
|
+
* />
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* <img src="media://chart-data-source-example-1.png" width="800px" />
|
|
26
|
+
*
|
|
27
|
+
* (2) An example of using the `Chart` component to
|
|
28
|
+
* plot a pie chart of static data provided in code:
|
|
29
|
+
* ```tsx
|
|
30
|
+
* <Chart
|
|
31
|
+
* chartType={'pie'}
|
|
32
|
+
* dataSet={{
|
|
33
|
+
* columns: [
|
|
34
|
+
* { name: 'Years', type: 'date' },
|
|
35
|
+
* { name: 'Group', type: 'string' },
|
|
36
|
+
* { name: 'Quantity', type: 'number' },
|
|
37
|
+
* { name: 'Units', type: 'number' },
|
|
38
|
+
* ],
|
|
39
|
+
* rows: [
|
|
40
|
+
* ['2009', 'A', 6781, 10],
|
|
41
|
+
* ['2009', 'B', 5500, 15],
|
|
42
|
+
* ['2010', 'A', 4471, 70],
|
|
43
|
+
* ['2011', 'B', 1812, 50],
|
|
44
|
+
* ['2012', 'B', 5001, 60],
|
|
45
|
+
* ['2013', 'A', 2045, 40],
|
|
46
|
+
* ['2014', 'B', 3010, 90],
|
|
47
|
+
* ['2015', 'A', 5447, 80],
|
|
48
|
+
* ['2016', 'B', 4242, 70],
|
|
49
|
+
* ['2017', 'B', 936, 20],
|
|
50
|
+
* ],
|
|
51
|
+
* }}
|
|
52
|
+
* dataOptions={{
|
|
53
|
+
* category: [
|
|
54
|
+
* {
|
|
55
|
+
* name: 'Years',
|
|
56
|
+
* type: 'date',
|
|
57
|
+
* },
|
|
58
|
+
* ],
|
|
59
|
+
* value: [
|
|
60
|
+
* {
|
|
61
|
+
* name: 'Quantity',
|
|
62
|
+
* aggregation: 'sum',
|
|
63
|
+
* title: 'Total Quantity',
|
|
64
|
+
* },
|
|
65
|
+
* ],
|
|
66
|
+
* }}
|
|
67
|
+
* styleOptions={{
|
|
68
|
+
* legend: {
|
|
69
|
+
* enabled: true,
|
|
70
|
+
* position: 'bottom',
|
|
71
|
+
* },
|
|
72
|
+
* }}
|
|
73
|
+
* />
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* <img src="media://chart-local-data-example-1.png" width="800px" />
|
|
77
|
+
* @param props - Chart properties
|
|
78
|
+
* @returns Chart component representing a chart type as specified in `ChartProps.`{@link ChartProps.chartType}
|
|
79
|
+
*/
|
|
80
|
+
export declare const Chart: import("react").FunctionComponent<ChartProps>;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { IndicatorLegacyChartDataOptions } from '../indicator-legacy-chart-data-options.js';
|
|
2
|
+
import { BaseMeasure, FitSecondaryMeasure, FitTitleMeasure, FitValueMeasure, LegacyIndicatorChartOptions } from '../types.js';
|
|
3
|
+
export declare class Gauge {
|
|
4
|
+
/**
|
|
5
|
+
* Returns base measure data.
|
|
6
|
+
*/
|
|
7
|
+
getBaseMeasure(data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions, container: HTMLElement): BaseMeasure | null;
|
|
8
|
+
/**
|
|
9
|
+
* Renders indicator gauge widget.
|
|
10
|
+
*
|
|
11
|
+
* @param {HTMLElement} canvas
|
|
12
|
+
* @param {object} data
|
|
13
|
+
* @param {object} options
|
|
14
|
+
* @param {object} baseMeasure
|
|
15
|
+
*/
|
|
16
|
+
render(canvas: HTMLCanvasElement, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any, baseMeasure: BaseMeasure): void;
|
|
17
|
+
/**
|
|
18
|
+
* Returns fit title measure data.
|
|
19
|
+
*
|
|
20
|
+
* @param ctx
|
|
21
|
+
* @param data
|
|
22
|
+
* @param options
|
|
23
|
+
*/
|
|
24
|
+
getFitTitleMeasure(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): FitTitleMeasure;
|
|
25
|
+
/**
|
|
26
|
+
* Returns fit value measure data.
|
|
27
|
+
*
|
|
28
|
+
* @param ctx
|
|
29
|
+
* @param data
|
|
30
|
+
* @param options
|
|
31
|
+
*/
|
|
32
|
+
getFitValueMeasure(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): FitValueMeasure;
|
|
33
|
+
/**
|
|
34
|
+
* Returns fit value measure data.
|
|
35
|
+
*
|
|
36
|
+
* @param ctx
|
|
37
|
+
* @param data
|
|
38
|
+
* @param options
|
|
39
|
+
*/
|
|
40
|
+
getFitSecondaryMeasure(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): FitSecondaryMeasure;
|
|
41
|
+
/**
|
|
42
|
+
* Returns canvas width.
|
|
43
|
+
*
|
|
44
|
+
* @param data
|
|
45
|
+
* @param options
|
|
46
|
+
*/
|
|
47
|
+
getCanvasWidth(data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): number;
|
|
48
|
+
/**
|
|
49
|
+
* Draws indicator numeric bar widget.
|
|
50
|
+
*
|
|
51
|
+
* @param ctx
|
|
52
|
+
* @param data
|
|
53
|
+
* @param options
|
|
54
|
+
*/
|
|
55
|
+
draw(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): void;
|
|
56
|
+
/**
|
|
57
|
+
* Clears the canvas.
|
|
58
|
+
*
|
|
59
|
+
* @param ctx
|
|
60
|
+
* @param options
|
|
61
|
+
*/
|
|
62
|
+
clearCanvas(ctx: CanvasRenderingContext2D, options: LegacyIndicatorChartOptions | any): void;
|
|
63
|
+
/**
|
|
64
|
+
* Draws the title section.
|
|
65
|
+
*
|
|
66
|
+
* @param ctx
|
|
67
|
+
* @param options
|
|
68
|
+
*/
|
|
69
|
+
drawTitle(ctx: CanvasRenderingContext2D, options: LegacyIndicatorChartOptions | any): void;
|
|
70
|
+
/**
|
|
71
|
+
* Draws the gauge section.
|
|
72
|
+
*
|
|
73
|
+
* @param ctx
|
|
74
|
+
* @param data
|
|
75
|
+
* @param options
|
|
76
|
+
*/
|
|
77
|
+
drawGauge(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions | any, options: LegacyIndicatorChartOptions | any): void;
|
|
78
|
+
/**
|
|
79
|
+
* Draws the value section.
|
|
80
|
+
*
|
|
81
|
+
* @param ctx
|
|
82
|
+
* @param data
|
|
83
|
+
* @param options
|
|
84
|
+
*/
|
|
85
|
+
drawValue(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): void;
|
|
86
|
+
/**
|
|
87
|
+
* Draws the secondary section.
|
|
88
|
+
*
|
|
89
|
+
* @param ctx
|
|
90
|
+
* @param options
|
|
91
|
+
*/
|
|
92
|
+
drawSecondary(ctx: CanvasRenderingContext2D, options: LegacyIndicatorChartOptions | any): void;
|
|
93
|
+
/**
|
|
94
|
+
* Draws the left and right brackets.
|
|
95
|
+
*
|
|
96
|
+
* @param ctx
|
|
97
|
+
* @param data
|
|
98
|
+
* @param options
|
|
99
|
+
*/
|
|
100
|
+
drawBrackets(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): void;
|
|
101
|
+
/**
|
|
102
|
+
* Returns the gauge needle angle.
|
|
103
|
+
*
|
|
104
|
+
* @param data
|
|
105
|
+
* @param options
|
|
106
|
+
*/
|
|
107
|
+
getNeedleAngle(data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): any;
|
|
108
|
+
/**
|
|
109
|
+
* Returns the angle according to the passed value, min and max arguments.
|
|
110
|
+
*
|
|
111
|
+
* @param options
|
|
112
|
+
* @param value
|
|
113
|
+
* @param min
|
|
114
|
+
* @param max
|
|
115
|
+
*/
|
|
116
|
+
getAngle(options: LegacyIndicatorChartOptions | any, value: number, min: number, max: number): number;
|
|
117
|
+
/**
|
|
118
|
+
* Draws conditional dial section.
|
|
119
|
+
*
|
|
120
|
+
* @param ctx
|
|
121
|
+
* @param data
|
|
122
|
+
* @param options
|
|
123
|
+
*/
|
|
124
|
+
drawConditionalDial(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions | any, options: LegacyIndicatorChartOptions | any): void;
|
|
125
|
+
/**
|
|
126
|
+
* Draws simple dial section.
|
|
127
|
+
*
|
|
128
|
+
* @param ctx
|
|
129
|
+
* @param data
|
|
130
|
+
* @param options
|
|
131
|
+
*/
|
|
132
|
+
drawSimpleDial(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): void;
|
|
133
|
+
/**
|
|
134
|
+
* Draws the gauge arc section.
|
|
135
|
+
*
|
|
136
|
+
* @param ctx
|
|
137
|
+
* @param options
|
|
138
|
+
* @param startAngleRad
|
|
139
|
+
* @param endAngleRad
|
|
140
|
+
* @param color
|
|
141
|
+
*/
|
|
142
|
+
drawArc(ctx: CanvasRenderingContext2D, options: LegacyIndicatorChartOptions | any, startAngleRad: number, endAngleRad: number, color: string): void;
|
|
143
|
+
/**
|
|
144
|
+
* Draws the gauge ticks.
|
|
145
|
+
*
|
|
146
|
+
* @param ctx
|
|
147
|
+
* @param data
|
|
148
|
+
* @param options
|
|
149
|
+
*/
|
|
150
|
+
drawTicks(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): void;
|
|
151
|
+
/**
|
|
152
|
+
* Draws the gauge needle.
|
|
153
|
+
*
|
|
154
|
+
* @param {object} ctx
|
|
155
|
+
* @param {object} options
|
|
156
|
+
*/
|
|
157
|
+
drawNeedle(ctx: CanvasRenderingContext2D, options: LegacyIndicatorChartOptions | any): void;
|
|
158
|
+
/**
|
|
159
|
+
* Draws the gauge labels.
|
|
160
|
+
*
|
|
161
|
+
* @param ctx
|
|
162
|
+
* @param data
|
|
163
|
+
* @param options
|
|
164
|
+
*/
|
|
165
|
+
drawLabels(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): void;
|
|
166
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare class IndicatorHelper {
|
|
2
|
+
/**
|
|
3
|
+
* Converts degrees to radians.
|
|
4
|
+
*
|
|
5
|
+
* @param {number} angle
|
|
6
|
+
* @returns {number}
|
|
7
|
+
*/
|
|
8
|
+
degToRad(angle: number): number;
|
|
9
|
+
/**
|
|
10
|
+
* Returns fit string measure.
|
|
11
|
+
*
|
|
12
|
+
* @param {object} ctx
|
|
13
|
+
* @param {string} string
|
|
14
|
+
* @param {number} maxWidth
|
|
15
|
+
* @param {string} font
|
|
16
|
+
* @returns {object}
|
|
17
|
+
*/
|
|
18
|
+
getFitStringMeasure(ctx: CanvasRenderingContext2D, string: string, maxWidth: number, font: string): {
|
|
19
|
+
string: string;
|
|
20
|
+
width: number;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Returns string width.
|
|
24
|
+
*
|
|
25
|
+
* @param {object} ctx
|
|
26
|
+
* @param {string} string
|
|
27
|
+
* @returns {number}
|
|
28
|
+
*/
|
|
29
|
+
getStringWidth(ctx: CanvasRenderingContext2D, string: string): number;
|
|
30
|
+
/**
|
|
31
|
+
* Rounds a number downward to its nearest integer with specified number of decimals.
|
|
32
|
+
*
|
|
33
|
+
* @param {number} value
|
|
34
|
+
* @param {number} decimals
|
|
35
|
+
* @returns {number}
|
|
36
|
+
*/
|
|
37
|
+
floor(value: number, decimals: number): number;
|
|
38
|
+
/**
|
|
39
|
+
* Sets canvas width and height considering device pixel ratio.
|
|
40
|
+
*
|
|
41
|
+
* @param {HTMLElement} canvas
|
|
42
|
+
* @param {CanvasRenderingContext2D} ctx
|
|
43
|
+
* @param {number} width
|
|
44
|
+
* @param {number} height
|
|
45
|
+
*/
|
|
46
|
+
setCanvasSizes(canvas: HTMLCanvasElement, ctx: CanvasRenderingContext2D, width: number, height: number): void;
|
|
47
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { NumericSimple } from './numeric-simple.js';
|
|
2
|
+
import { NumericBar } from './numeric-bar.js';
|
|
3
|
+
import { Gauge } from './gauge.js';
|
|
4
|
+
import { Ticker } from './ticker.js';
|
|
5
|
+
import { IndicatorLegacyChartDataOptions } from '../indicator-legacy-chart-data-options.js';
|
|
6
|
+
import { LegacyIndicatorChartOptions, LegacyIndicatorChartTypes } from '../types.js';
|
|
7
|
+
export declare class Indicator {
|
|
8
|
+
/**
|
|
9
|
+
* Returns render service according to the passed indicator type.
|
|
10
|
+
*
|
|
11
|
+
* @param type
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
getService(type: LegacyIndicatorChartTypes): Gauge | NumericSimple | NumericBar | Ticker;
|
|
15
|
+
/**
|
|
16
|
+
* Main method for rendering indicator.
|
|
17
|
+
*
|
|
18
|
+
* @param {HTMLElement} canvas
|
|
19
|
+
* @param {object} legacyDataOptions
|
|
20
|
+
* @param {object} options
|
|
21
|
+
* @param {HTMLElement} container
|
|
22
|
+
*/
|
|
23
|
+
render(canvas: HTMLCanvasElement, legacyDataOptions: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions, container: HTMLElement): void;
|
|
24
|
+
/**
|
|
25
|
+
* Calculates relative sizes based on the base size value.
|
|
26
|
+
*
|
|
27
|
+
* @param {object} legacyDataOptions
|
|
28
|
+
* @param {object} options
|
|
29
|
+
* @param {number} baseValue
|
|
30
|
+
*/
|
|
31
|
+
calculateRelativeSizes(legacyDataOptions: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions, baseValue: number): void;
|
|
32
|
+
/**
|
|
33
|
+
* Sets text options.
|
|
34
|
+
*
|
|
35
|
+
* @param {object} options
|
|
36
|
+
* @param {string} size
|
|
37
|
+
*/
|
|
38
|
+
setTextOptions(options: LegacyIndicatorChartOptions, size: string): void;
|
|
39
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { IndicatorLegacyChartDataOptions } from '../indicator-legacy-chart-data-options.js';
|
|
2
|
+
import { BaseMeasure, FitSecondaryMeasure, FitTitleMeasure, FitValueMeasure, LegacyIndicatorChartOptions } from '../types.js';
|
|
3
|
+
export declare class NumericBar {
|
|
4
|
+
/**
|
|
5
|
+
* Returns base measure data.
|
|
6
|
+
*
|
|
7
|
+
* @param {object} data
|
|
8
|
+
* @param {object} options
|
|
9
|
+
* @param {HTMLElement} container
|
|
10
|
+
* @returns {BaseMeasure|null}
|
|
11
|
+
*/
|
|
12
|
+
getBaseMeasure(data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions, container: HTMLElement): BaseMeasure | null;
|
|
13
|
+
/**
|
|
14
|
+
* Renders indicator numeric bar widget.
|
|
15
|
+
*
|
|
16
|
+
* @param canvas
|
|
17
|
+
* @param data
|
|
18
|
+
* @param options
|
|
19
|
+
* @param baseMeasure
|
|
20
|
+
*/
|
|
21
|
+
render(canvas: HTMLCanvasElement, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any, baseMeasure: BaseMeasure): void;
|
|
22
|
+
/**
|
|
23
|
+
* Returns fit title measure data.
|
|
24
|
+
*
|
|
25
|
+
* @param ctx
|
|
26
|
+
* @param data
|
|
27
|
+
* @param options
|
|
28
|
+
*/
|
|
29
|
+
getFitTitleMeasure(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): FitTitleMeasure;
|
|
30
|
+
/**
|
|
31
|
+
* Returns fit value measure data.
|
|
32
|
+
*
|
|
33
|
+
* @param ctx
|
|
34
|
+
* @param data
|
|
35
|
+
* @param options
|
|
36
|
+
*/
|
|
37
|
+
getFitValueMeasure(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): FitValueMeasure;
|
|
38
|
+
/**
|
|
39
|
+
* Returns fit value measure data.
|
|
40
|
+
*
|
|
41
|
+
* @param ctx
|
|
42
|
+
* @param data
|
|
43
|
+
* @param options
|
|
44
|
+
*/
|
|
45
|
+
getFitSecondaryMeasure(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): FitSecondaryMeasure;
|
|
46
|
+
/**
|
|
47
|
+
* Returns canvas width.
|
|
48
|
+
*
|
|
49
|
+
* @param data
|
|
50
|
+
* @param options
|
|
51
|
+
*/
|
|
52
|
+
getCanvasWidth(data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): number;
|
|
53
|
+
/**
|
|
54
|
+
* Draws indicator numeric bar widget.
|
|
55
|
+
*
|
|
56
|
+
* @param ctx
|
|
57
|
+
* @param data
|
|
58
|
+
* @param options
|
|
59
|
+
*/
|
|
60
|
+
draw(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): void;
|
|
61
|
+
/**
|
|
62
|
+
* Clears the canvas.
|
|
63
|
+
*
|
|
64
|
+
* @param ctx
|
|
65
|
+
* @param options
|
|
66
|
+
*/
|
|
67
|
+
clearCanvas(ctx: CanvasRenderingContext2D, options: LegacyIndicatorChartOptions | any): void;
|
|
68
|
+
/**
|
|
69
|
+
* Draws the title section.
|
|
70
|
+
*
|
|
71
|
+
* @param ctx
|
|
72
|
+
* @param options
|
|
73
|
+
*/
|
|
74
|
+
drawTitle(ctx: CanvasRenderingContext2D, options: LegacyIndicatorChartOptions | any): void;
|
|
75
|
+
/**
|
|
76
|
+
* Draws the value section.
|
|
77
|
+
*
|
|
78
|
+
* @param ctx
|
|
79
|
+
* @param data
|
|
80
|
+
* @param options
|
|
81
|
+
*/
|
|
82
|
+
drawValue(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): void;
|
|
83
|
+
/**
|
|
84
|
+
* Draws the secondary section.
|
|
85
|
+
*
|
|
86
|
+
* @param ctx
|
|
87
|
+
* @param options
|
|
88
|
+
*/
|
|
89
|
+
drawSecondary(ctx: CanvasRenderingContext2D, options: LegacyIndicatorChartOptions | any): void;
|
|
90
|
+
/**
|
|
91
|
+
* Draws the left and right brackets.
|
|
92
|
+
*
|
|
93
|
+
* @param ctx
|
|
94
|
+
* @param data
|
|
95
|
+
* @param options
|
|
96
|
+
*/
|
|
97
|
+
drawBrackets(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): void;
|
|
98
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { IndicatorLegacyChartDataOptions } from '../indicator-legacy-chart-data-options';
|
|
2
|
+
import { BaseMeasure, FitSecondaryMeasure, FitTitleMeasure, FitValueMeasure, LegacyIndicatorChartOptions } from '../types';
|
|
3
|
+
export declare class NumericSimple {
|
|
4
|
+
/**
|
|
5
|
+
* Returns base measure data.
|
|
6
|
+
*
|
|
7
|
+
* @param {object} data
|
|
8
|
+
* @param {object} options
|
|
9
|
+
* @param {HTMLElement} container
|
|
10
|
+
* @returns {BaseMeasure|null}
|
|
11
|
+
*/
|
|
12
|
+
getBaseMeasure(data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions, container: HTMLElement): BaseMeasure | null;
|
|
13
|
+
/**
|
|
14
|
+
* Renders indicator numeric simple widget.
|
|
15
|
+
*
|
|
16
|
+
* @param canvas
|
|
17
|
+
* @param data
|
|
18
|
+
* @param options
|
|
19
|
+
* @param baseMeasure
|
|
20
|
+
*/
|
|
21
|
+
render(canvas: HTMLCanvasElement, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any, baseMeasure: BaseMeasure): void;
|
|
22
|
+
/**
|
|
23
|
+
* Returns fit title measure data.
|
|
24
|
+
*
|
|
25
|
+
* @param ctx
|
|
26
|
+
* @param data
|
|
27
|
+
* @param options
|
|
28
|
+
*/
|
|
29
|
+
getFitTitleMeasure(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): FitTitleMeasure | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Returns fit value measure data.
|
|
32
|
+
*
|
|
33
|
+
* @param ctx
|
|
34
|
+
* @param data
|
|
35
|
+
* @param options
|
|
36
|
+
*/
|
|
37
|
+
getFitValueMeasure(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): FitValueMeasure;
|
|
38
|
+
/**
|
|
39
|
+
* Returns fit value measure data.
|
|
40
|
+
*
|
|
41
|
+
* @param ctx
|
|
42
|
+
* @param data
|
|
43
|
+
* @param options
|
|
44
|
+
*/
|
|
45
|
+
getFitSecondaryMeasure(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): FitSecondaryMeasure;
|
|
46
|
+
/**
|
|
47
|
+
* Returns canvas width.
|
|
48
|
+
*
|
|
49
|
+
* @param data
|
|
50
|
+
* @param options
|
|
51
|
+
*/
|
|
52
|
+
getCanvasWidth(data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): number;
|
|
53
|
+
/**
|
|
54
|
+
* Draws indicator numeric bar widget.
|
|
55
|
+
*
|
|
56
|
+
* @param ctx
|
|
57
|
+
* @param data
|
|
58
|
+
* @param options
|
|
59
|
+
*/
|
|
60
|
+
draw(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): void;
|
|
61
|
+
/**
|
|
62
|
+
* Clears the canvas.
|
|
63
|
+
*
|
|
64
|
+
* @param ctx
|
|
65
|
+
* @param options
|
|
66
|
+
*/
|
|
67
|
+
clearCanvas(ctx: CanvasRenderingContext2D, options: LegacyIndicatorChartOptions | any): void;
|
|
68
|
+
/**
|
|
69
|
+
* Draws the title section.
|
|
70
|
+
*
|
|
71
|
+
* @param ctx
|
|
72
|
+
* @param data
|
|
73
|
+
* @param options
|
|
74
|
+
*/
|
|
75
|
+
drawTitle(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): void;
|
|
76
|
+
/**
|
|
77
|
+
* Draws the value section.
|
|
78
|
+
*
|
|
79
|
+
* @param ctx
|
|
80
|
+
* @param data
|
|
81
|
+
* @param options
|
|
82
|
+
*/
|
|
83
|
+
drawValue(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): void;
|
|
84
|
+
/**
|
|
85
|
+
* Draws the secondary section.
|
|
86
|
+
*
|
|
87
|
+
* @param ctx
|
|
88
|
+
* @param options
|
|
89
|
+
*/
|
|
90
|
+
drawSecondary(ctx: CanvasRenderingContext2D, options: LegacyIndicatorChartOptions | any): void;
|
|
91
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { IndicatorLegacyChartDataOptions } from '../indicator-legacy-chart-data-options';
|
|
2
|
+
import { LegacyIndicatorChartOptions } from '../types';
|
|
3
|
+
export declare class Ticker {
|
|
4
|
+
/**
|
|
5
|
+
* Renders indicator ticker widget.
|
|
6
|
+
*
|
|
7
|
+
* @param {HTMLElement} canvas
|
|
8
|
+
* @param {object} data
|
|
9
|
+
* @param {object} options
|
|
10
|
+
* @param {HTMLElement} container
|
|
11
|
+
*/
|
|
12
|
+
render(canvas: HTMLCanvasElement, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any, container: HTMLElement): void;
|
|
13
|
+
/**
|
|
14
|
+
* Draws indicator ticker widget.
|
|
15
|
+
*
|
|
16
|
+
* @param ctx
|
|
17
|
+
* @param data
|
|
18
|
+
* @param options
|
|
19
|
+
*/
|
|
20
|
+
draw(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): void;
|
|
21
|
+
/**
|
|
22
|
+
* Clears the canvas.
|
|
23
|
+
*
|
|
24
|
+
* @param ctx
|
|
25
|
+
* @param options
|
|
26
|
+
*/
|
|
27
|
+
clearCanvas(ctx: CanvasRenderingContext2D, options: LegacyIndicatorChartOptions | any): void;
|
|
28
|
+
/**
|
|
29
|
+
* Draws the ticker bar section.
|
|
30
|
+
*
|
|
31
|
+
* @param {object} ctx
|
|
32
|
+
* @param {object} data
|
|
33
|
+
* @param {object} options
|
|
34
|
+
*/
|
|
35
|
+
drawTickerBar(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): void;
|
|
36
|
+
/**
|
|
37
|
+
* Draws the divider.
|
|
38
|
+
*
|
|
39
|
+
* @param ctx
|
|
40
|
+
* @param options
|
|
41
|
+
*/
|
|
42
|
+
drawDivider(ctx: CanvasRenderingContext2D, options: LegacyIndicatorChartOptions | any): void;
|
|
43
|
+
/**
|
|
44
|
+
* Draws the title section.
|
|
45
|
+
*
|
|
46
|
+
* @param ctx
|
|
47
|
+
* @param options
|
|
48
|
+
*/
|
|
49
|
+
drawTitle(ctx: CanvasRenderingContext2D, options: LegacyIndicatorChartOptions | any): void;
|
|
50
|
+
/**
|
|
51
|
+
* Draws the value section.
|
|
52
|
+
*
|
|
53
|
+
* @param ctx
|
|
54
|
+
* @param data
|
|
55
|
+
* @param options
|
|
56
|
+
*/
|
|
57
|
+
drawValue(ctx: CanvasRenderingContext2D, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any): void;
|
|
58
|
+
/**
|
|
59
|
+
* Draws the secondary section.
|
|
60
|
+
*
|
|
61
|
+
* @param ctx
|
|
62
|
+
* @param options
|
|
63
|
+
*/
|
|
64
|
+
drawSecondary(ctx: CanvasRenderingContext2D, options: LegacyIndicatorChartOptions | any): void;
|
|
65
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { IndicatorDataOptions } from '../../chart-data-options/types';
|
|
2
|
+
import { IndicatorChartDesignOptions } from '../../chart-options-processor/translations/design-options';
|
|
3
|
+
import { IndicatorChartData } from '../../chart-data/types';
|
|
4
|
+
import { LegacyIndicatorChartTypes } from './types';
|
|
5
|
+
export type IndicatorLegacyChartDataOptions = ReturnType<typeof createLegacyChartDataOptions>;
|
|
6
|
+
export declare const createLegacyChartDataOptions: (chartData: IndicatorChartData, chartDesignOptions: IndicatorChartDesignOptions, chartDataOptions: IndicatorDataOptions) => {
|
|
7
|
+
type: LegacyIndicatorChartTypes;
|
|
8
|
+
skin: 1 | 2 | "vertical" | "horizontal";
|
|
9
|
+
title: {
|
|
10
|
+
text: string;
|
|
11
|
+
};
|
|
12
|
+
min: {
|
|
13
|
+
data: number;
|
|
14
|
+
text: string;
|
|
15
|
+
};
|
|
16
|
+
max: {
|
|
17
|
+
data: number;
|
|
18
|
+
text: string;
|
|
19
|
+
};
|
|
20
|
+
value: {
|
|
21
|
+
data: number | undefined;
|
|
22
|
+
text: string;
|
|
23
|
+
};
|
|
24
|
+
secondary: {
|
|
25
|
+
data: number | undefined;
|
|
26
|
+
text: string;
|
|
27
|
+
};
|
|
28
|
+
secondaryTitle: {
|
|
29
|
+
text: string;
|
|
30
|
+
};
|
|
31
|
+
showSecondary: boolean;
|
|
32
|
+
showTitle: boolean;
|
|
33
|
+
showLabels: boolean;
|
|
34
|
+
showTicks: boolean;
|
|
35
|
+
color: string;
|
|
36
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { NumericSimpleOptions, NumericBarOptions, GaugeOptions } from '../types';
|
|
2
|
+
export declare const defaultNumericSimpleOptions: NumericSimpleOptions;
|
|
3
|
+
export declare const defaultNumericBarOptions: NumericBarOptions;
|
|
4
|
+
export declare const defaultGaugeOptions: GaugeOptions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './indicator-legacy-chart-options';
|
package/dist/charts/indicator/indicator-legacy-chart-options/indicator-legacy-chart-options.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IndicatorStyleType, NumericIndicatorSubType } from '../../../chart-options-processor/translations/design-options';
|
|
2
|
+
import { IndicatorDataOptions, ThemeSettings } from '../../../types';
|
|
3
|
+
import { LegacyIndicatorChartOptions } from '../types';
|
|
4
|
+
import { IndicatorChartData } from '../../../chart-data/types';
|
|
5
|
+
export type ChartRenderingOptions = {
|
|
6
|
+
chartData: IndicatorChartData;
|
|
7
|
+
dataOptions: IndicatorDataOptions;
|
|
8
|
+
themeSettings?: ThemeSettings;
|
|
9
|
+
};
|
|
10
|
+
export type IndicatorTypeOptions = {
|
|
11
|
+
type: Exclude<IndicatorStyleType, 'numeric'>;
|
|
12
|
+
} | {
|
|
13
|
+
type: 'numeric';
|
|
14
|
+
numericSubtype?: NumericIndicatorSubType;
|
|
15
|
+
};
|
|
16
|
+
export declare const createIndicatorLegacyChartOptions: (typeOptions: IndicatorTypeOptions, chartRenderingOptions: ChartRenderingOptions) => LegacyIndicatorChartOptions;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* Dictionary of how to map legacy chart options to theme settings for overriding
|
|
4
|
+
* [PATH_IN_LEGACY_CHART_OPTIONS]: [PATH_IN_THEME_SETTINGS]
|
|
5
|
+
*/
|
|
6
|
+
export declare const legacyOptionsToThemeSettingsDictionary: {
|
|
7
|
+
fontFamily: string;
|
|
8
|
+
'title.color': string;
|
|
9
|
+
backgroundColor: string;
|
|
10
|
+
'label.color': string;
|
|
11
|
+
'secondaryTitle.color': string;
|
|
12
|
+
};
|
package/dist/charts/indicator/indicator-legacy-chart-options/override-with-theme-settings.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ThemeSettings } from '../../../types.js';
|
|
2
|
+
import { LegacyIndicatorChartOptions } from '../types.js';
|
|
3
|
+
export declare function overrideWithThemeSettings(themeSettings: ThemeSettings, legacyOptionsToThemeSettingsDictionary: Record<string, string>, legacyChartOptions: LegacyIndicatorChartOptions): LegacyIndicatorChartOptions;
|