@fluentui/react-charting 5.16.44 → 5.16.45

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.
Files changed (125) hide show
  1. package/CHANGELOG.json +22 -1
  2. package/CHANGELOG.md +12 -2
  3. package/dist/react-charting.js +1 -1
  4. package/dist/react-charting.min.js +1 -1
  5. package/docs/TestPlans/GaugeChart/ComponentTests.md +31 -0
  6. package/lib/GaugeChart.d.ts +1 -0
  7. package/lib/GaugeChart.js +2 -0
  8. package/lib/GaugeChart.js.map +1 -0
  9. package/lib/components/GaugeChart/GaugeChart.base.d.ts +67 -0
  10. package/lib/components/GaugeChart/GaugeChart.base.js +376 -0
  11. package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -0
  12. package/lib/components/GaugeChart/GaugeChart.d.ts +3 -0
  13. package/lib/components/GaugeChart/GaugeChart.js +5 -0
  14. package/lib/components/GaugeChart/GaugeChart.js.map +1 -0
  15. package/lib/components/GaugeChart/GaugeChart.styles.d.ts +2 -0
  16. package/lib/components/GaugeChart/GaugeChart.styles.js +118 -0
  17. package/lib/components/GaugeChart/GaugeChart.styles.js.map +1 -0
  18. package/lib/components/GaugeChart/GaugeChart.types.d.ts +207 -0
  19. package/lib/components/GaugeChart/GaugeChart.types.js +6 -0
  20. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -0
  21. package/lib/components/GaugeChart/index.d.ts +2 -0
  22. package/lib/components/GaugeChart/index.js +3 -0
  23. package/lib/components/GaugeChart/index.js.map +1 -0
  24. package/lib/components/LineChart/LineChart.base.js +1 -1
  25. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  26. package/lib/components/LineChart/LineChart.types.d.ts +2 -2
  27. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  28. package/lib/components/LineChart/eventAnnotation/EventAnnotation.d.ts +2 -0
  29. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +6 -3
  30. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  31. package/lib/components/LineChart/eventAnnotation/LabelLink.d.ts +3 -1
  32. package/lib/components/LineChart/eventAnnotation/LabelLink.js +6 -3
  33. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  34. package/lib/index.d.ts +1 -0
  35. package/lib/index.js +1 -0
  36. package/lib/index.js.map +1 -1
  37. package/lib/utilities/SVGTooltipText.d.ts +81 -0
  38. package/lib/utilities/SVGTooltipText.js +173 -0
  39. package/lib/utilities/SVGTooltipText.js.map +1 -0
  40. package/lib/utilities/utilities.d.ts +1 -0
  41. package/lib/utilities/utilities.js +11 -0
  42. package/lib/utilities/utilities.js.map +1 -1
  43. package/lib/version.js +1 -1
  44. package/lib/version.js.map +1 -1
  45. package/lib-amd/GaugeChart.d.ts +1 -0
  46. package/lib-amd/GaugeChart.js +6 -0
  47. package/lib-amd/GaugeChart.js.map +1 -0
  48. package/lib-amd/components/GaugeChart/GaugeChart.base.d.ts +67 -0
  49. package/lib-amd/components/GaugeChart/GaugeChart.base.js +370 -0
  50. package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -0
  51. package/lib-amd/components/GaugeChart/GaugeChart.d.ts +3 -0
  52. package/lib-amd/components/GaugeChart/GaugeChart.js +7 -0
  53. package/lib-amd/components/GaugeChart/GaugeChart.js.map +1 -0
  54. package/lib-amd/components/GaugeChart/GaugeChart.styles.d.ts +2 -0
  55. package/lib-amd/components/GaugeChart/GaugeChart.styles.js +122 -0
  56. package/lib-amd/components/GaugeChart/GaugeChart.styles.js.map +1 -0
  57. package/lib-amd/components/GaugeChart/GaugeChart.types.d.ts +207 -0
  58. package/lib-amd/components/GaugeChart/GaugeChart.types.js +11 -0
  59. package/lib-amd/components/GaugeChart/GaugeChart.types.js.map +1 -0
  60. package/lib-amd/components/GaugeChart/index.d.ts +2 -0
  61. package/lib-amd/components/GaugeChart/index.js +7 -0
  62. package/lib-amd/components/GaugeChart/index.js.map +1 -0
  63. package/lib-amd/components/LineChart/LineChart.base.js +1 -1
  64. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  65. package/lib-amd/components/LineChart/LineChart.types.d.ts +2 -2
  66. package/lib-amd/components/LineChart/LineChart.types.js.map +1 -1
  67. package/lib-amd/components/LineChart/eventAnnotation/EventAnnotation.d.ts +2 -0
  68. package/lib-amd/components/LineChart/eventAnnotation/EventAnnotation.js +6 -4
  69. package/lib-amd/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  70. package/lib-amd/components/LineChart/eventAnnotation/LabelLink.d.ts +3 -1
  71. package/lib-amd/components/LineChart/eventAnnotation/LabelLink.js +6 -4
  72. package/lib-amd/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  73. package/lib-amd/index.d.ts +1 -0
  74. package/lib-amd/index.js +2 -1
  75. package/lib-amd/index.js.map +1 -1
  76. package/lib-amd/utilities/SVGTooltipText.d.ts +81 -0
  77. package/lib-amd/utilities/SVGTooltipText.js +174 -0
  78. package/lib-amd/utilities/SVGTooltipText.js.map +1 -0
  79. package/lib-amd/utilities/utilities.d.ts +1 -0
  80. package/lib-amd/utilities/utilities.js +13 -2
  81. package/lib-amd/utilities/utilities.js.map +1 -1
  82. package/lib-amd/version.js +1 -1
  83. package/lib-amd/version.js.map +1 -1
  84. package/lib-commonjs/GaugeChart.d.ts +1 -0
  85. package/lib-commonjs/GaugeChart.js +5 -0
  86. package/lib-commonjs/GaugeChart.js.map +1 -0
  87. package/lib-commonjs/components/GaugeChart/GaugeChart.base.d.ts +67 -0
  88. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js +379 -0
  89. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -0
  90. package/lib-commonjs/components/GaugeChart/GaugeChart.d.ts +3 -0
  91. package/lib-commonjs/components/GaugeChart/GaugeChart.js +8 -0
  92. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -0
  93. package/lib-commonjs/components/GaugeChart/GaugeChart.styles.d.ts +2 -0
  94. package/lib-commonjs/components/GaugeChart/GaugeChart.styles.js +122 -0
  95. package/lib-commonjs/components/GaugeChart/GaugeChart.styles.js.map +1 -0
  96. package/lib-commonjs/components/GaugeChart/GaugeChart.types.d.ts +207 -0
  97. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js +9 -0
  98. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -0
  99. package/lib-commonjs/components/GaugeChart/index.d.ts +2 -0
  100. package/lib-commonjs/components/GaugeChart/index.js +6 -0
  101. package/lib-commonjs/components/GaugeChart/index.js.map +1 -0
  102. package/lib-commonjs/components/LineChart/LineChart.base.js +1 -1
  103. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  104. package/lib-commonjs/components/LineChart/LineChart.types.d.ts +2 -2
  105. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  106. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.d.ts +2 -0
  107. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +6 -3
  108. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  109. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.d.ts +3 -1
  110. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js +6 -3
  111. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  112. package/lib-commonjs/index.d.ts +1 -0
  113. package/lib-commonjs/index.js +1 -0
  114. package/lib-commonjs/index.js.map +1 -1
  115. package/lib-commonjs/utilities/SVGTooltipText.d.ts +81 -0
  116. package/lib-commonjs/utilities/SVGTooltipText.js +176 -0
  117. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -0
  118. package/lib-commonjs/utilities/utilities.d.ts +1 -0
  119. package/lib-commonjs/utilities/utilities.js +13 -1
  120. package/lib-commonjs/utilities/utilities.js.map +1 -1
  121. package/lib-commonjs/version.js +1 -1
  122. package/lib-commonjs/version.js.map +1 -1
  123. package/package.json +1 -1
  124. package/src/components/GaugeChart/GaugeChart.types.ts +258 -0
  125. package/src/components/LineChart/LineChart.types.ts +2 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GaugeChart.styles.js","sourceRoot":"../src/","sources":["components/GaugeChart/GaugeChart.styles.ts"],"names":[],"mappings":"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","sourcesContent":["import { FontSizes, FontWeights, HighContrastSelector, HighContrastSelectorBlack } from '@fluentui/react';\nimport { IGaugeChartStyleProps, IGaugeChartStyles } from './GaugeChart.types';\n\nexport const getStyles = (props: IGaugeChartStyleProps): IGaugeChartStyles => {\n const { theme, chartValueSize, chartWidth, chartHeight, className, lineColor, toDrawShape } = props;\n\n return {\n root: [\n theme.fonts.medium,\n 'ms-GaugeChart',\n {\n width: '100%',\n height: '100%',\n },\n className,\n ],\n\n chart: {\n display: 'block',\n width: chartWidth,\n height: chartHeight,\n },\n\n limits: {\n fontSize: FontSizes.small,\n fontWeight: FontWeights.semibold,\n fill: theme.palette.neutralPrimary,\n },\n\n chartValue: {\n fontSize: chartValueSize,\n fontWeight: FontWeights.semibold,\n fill: theme.palette.neutralPrimary,\n },\n\n sublabel: {\n fontSize: FontSizes.small,\n fontWeight: FontWeights.semibold,\n fill: theme.palette.neutralPrimary,\n },\n\n needle: {\n fill: theme.palette.black,\n stroke: theme.palette.white,\n },\n\n chartTitle: {\n fontSize: FontSizes.small,\n fill: theme.palette.neutralPrimary,\n },\n\n segment: {\n outline: 'none',\n stroke: theme.semanticColors.focusBorder,\n },\n\n legendsContainer: {\n width: chartWidth,\n },\n\n calloutContentRoot: [\n {\n display: 'grid',\n overflow: 'hidden',\n padding: '11px 16px 10px 16px',\n backgroundColor: theme.semanticColors.bodyBackground,\n backgroundBlendMode: 'normal, luminosity',\n },\n ],\n calloutDateTimeContainer: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n calloutContentX: [\n {\n ...theme.fonts.small,\n lineHeight: '16px',\n opacity: '0.8',\n color: theme.semanticColors.bodySubtext,\n },\n ],\n calloutBlockContainer: [\n theme.fonts.mediumPlus,\n {\n marginTop: '13px',\n color: theme.semanticColors.bodyText,\n },\n !toDrawShape && {\n selectors: {\n [HighContrastSelector]: {\n forcedColorAdjust: 'none',\n },\n },\n borderLeft: `4px solid ${lineColor}`,\n paddingLeft: '8px',\n },\n toDrawShape && {\n display: 'flex',\n },\n ],\n shapeStyles: {\n marginRight: '8px',\n },\n calloutlegendText: {\n ...theme.fonts.small,\n lineHeight: '16px',\n selectors: {\n [HighContrastSelectorBlack]: {\n color: 'rgb(255, 255, 255)',\n },\n },\n color: theme.semanticColors.bodySubtext,\n },\n calloutContentY: [\n {\n ...theme.fonts.mediumPlus,\n fontWeight: 'bold',\n lineHeight: '22px',\n selectors: {\n [HighContrastSelectorBlack]: {\n color: 'rgb(255, 255, 255)',\n },\n },\n },\n ],\n descriptionMessage: [\n theme.fonts.small,\n {\n selectors: {\n [HighContrastSelectorBlack]: {\n color: 'rgb(255, 255, 255)',\n },\n },\n color: theme.semanticColors.bodyText,\n marginTop: '10px',\n paddingTop: '10px',\n borderTop: `1px solid ${theme.semanticColors.menuDivider}`,\n },\n ],\n };\n};\n"]}
@@ -0,0 +1,207 @@
1
+ import { IStyle, ITheme } from '@fluentui/react/lib/Styling';
2
+ import { IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';
3
+ import { ILegendsProps } from '../Legends/index';
4
+ import { IAccessibilityProps } from '../../types/index';
5
+ import { ICalloutProps } from '@fluentui/react/lib/Callout';
6
+ export interface IGaugeChartSegment {
7
+ /**
8
+ * Legend text for a segment
9
+ */
10
+ legend: string;
11
+ /**
12
+ * Size of the segment
13
+ */
14
+ size: number;
15
+ /**
16
+ * Color of the segment
17
+ */
18
+ color?: string;
19
+ /**
20
+ * Accessibility data for the segment
21
+ */
22
+ accessibilityData?: IAccessibilityProps;
23
+ }
24
+ export declare enum GaugeValueFormat {
25
+ Percentage = "percentage",
26
+ Fraction = "fraction"
27
+ }
28
+ export interface IGaugeChartProps {
29
+ /**
30
+ * Width of the chart
31
+ */
32
+ width?: number;
33
+ /**
34
+ * Height of the chart
35
+ */
36
+ height?: number;
37
+ /**
38
+ * Title of the chart
39
+ */
40
+ chartTitle?: string;
41
+ /**
42
+ * Current value of the gauge
43
+ */
44
+ chartValue: number;
45
+ /**
46
+ * Sections of the gauge
47
+ */
48
+ segments: IGaugeChartSegment[];
49
+ /**
50
+ * Minimum value of the gauge
51
+ * @defaultvalue 0
52
+ */
53
+ minValue?: number;
54
+ /**
55
+ * Maximum value of the gauge
56
+ */
57
+ maxValue?: number;
58
+ /**
59
+ * Additional text to display below the chart value
60
+ */
61
+ sublabel?: string;
62
+ /**
63
+ * Hide the min and max values of the gauge
64
+ * @defaultvalue false
65
+ */
66
+ hideMinMax?: boolean;
67
+ /**
68
+ * Format of the chart value
69
+ * @defaultvalue GaugeValueFormat.Percentage
70
+ */
71
+ chartValueFormat?: GaugeValueFormat | ((sweepFraction: number[]) => string);
72
+ /**
73
+ * Decides whether to show/hide legends
74
+ * @defaultvalue false
75
+ */
76
+ hideLegend?: boolean;
77
+ legendProps?: Partial<ILegendsProps>;
78
+ /**
79
+ * Do not show tooltips in chart
80
+ * @defaultvalue false
81
+ */
82
+ hideTooltip?: boolean;
83
+ /**
84
+ * Additional CSS class(es) to apply to the chart
85
+ */
86
+ className?: string;
87
+ /**
88
+ * Theme (provided through customization)
89
+ */
90
+ theme?: ITheme;
91
+ /**
92
+ * Call to provide customized styling that will layer on top of the variant rules
93
+ */
94
+ styles?: IStyleFunctionOrObject<IGaugeChartStyleProps, IGaugeChartStyles>;
95
+ /**
96
+ * Defines the culture to localize the numbers and dates
97
+ */
98
+ culture?: string;
99
+ /**
100
+ * Props for the callout in the chart
101
+ */
102
+ calloutProps?: Partial<ICalloutProps>;
103
+ }
104
+ export interface IGaugeChartStyleProps {
105
+ /**
106
+ * Theme (provided through customization)
107
+ */
108
+ theme: ITheme;
109
+ /**
110
+ * Font size of the chart value
111
+ */
112
+ chartValueSize?: number;
113
+ /**
114
+ * Width of the chart
115
+ */
116
+ chartWidth?: number;
117
+ /**
118
+ * Height of the chart
119
+ */
120
+ chartHeight?: number;
121
+ /**
122
+ * Additional CSS class(es) to apply to the chart
123
+ */
124
+ className?: string;
125
+ /**
126
+ * Color of the line
127
+ */
128
+ lineColor?: string;
129
+ /**
130
+ * Boolean flag which determines if shape is drawn in callout
131
+ */
132
+ toDrawShape?: boolean;
133
+ }
134
+ export interface IGaugeChartStyles {
135
+ /**
136
+ * Styles for the root element
137
+ */
138
+ root?: IStyle;
139
+ /**
140
+ * Styles for the chart
141
+ */
142
+ chart?: IStyle;
143
+ /**
144
+ * Styles for the min and max values
145
+ */
146
+ limits?: IStyle;
147
+ /**
148
+ * Styles for the chart value
149
+ */
150
+ chartValue?: IStyle;
151
+ /**
152
+ * Styles for the sublabel
153
+ */
154
+ sublabel?: IStyle;
155
+ /**
156
+ * Styles for the needle
157
+ */
158
+ needle?: IStyle;
159
+ /**
160
+ * Styles for the chart title
161
+ */
162
+ chartTitle?: IStyle;
163
+ /**
164
+ * Styles for the segments
165
+ */
166
+ segment?: IStyle;
167
+ /**
168
+ * Styles for the legends container
169
+ */
170
+ legendsContainer?: IStyle;
171
+ /**
172
+ * Styles for callout root-content
173
+ */
174
+ calloutContentRoot?: IStyle;
175
+ /**
176
+ * Styles for callout x-content
177
+ */
178
+ calloutContentX?: IStyle;
179
+ /**
180
+ * Styles for callout y-content
181
+ */
182
+ calloutContentY?: IStyle;
183
+ /**
184
+ * Styles for description message
185
+ */
186
+ descriptionMessage?: IStyle;
187
+ /**
188
+ * Styles for callout Date time container
189
+ */
190
+ calloutDateTimeContainer?: IStyle;
191
+ /**
192
+ * Styles for callout info container
193
+ */
194
+ calloutInfoContainer?: IStyle;
195
+ /**
196
+ * Styles for callout block container
197
+ */
198
+ calloutBlockContainer?: IStyle;
199
+ /**
200
+ * Styles for callout legend text
201
+ */
202
+ calloutlegendText?: IStyle;
203
+ /**
204
+ * Styles for the shape object in the callout
205
+ */
206
+ shapeStyles?: IStyle;
207
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GaugeValueFormat = void 0;
4
+ var GaugeValueFormat;
5
+ (function (GaugeValueFormat) {
6
+ GaugeValueFormat["Percentage"] = "percentage";
7
+ GaugeValueFormat["Fraction"] = "fraction";
8
+ })(GaugeValueFormat = exports.GaugeValueFormat || (exports.GaugeValueFormat = {}));
9
+ //# sourceMappingURL=GaugeChart.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GaugeChart.types.js","sourceRoot":"../src/","sources":["components/GaugeChart/GaugeChart.types.ts"],"names":[],"mappings":";;;AA4BA,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,6CAAyB,CAAA;IACzB,yCAAqB,CAAA;AACvB,CAAC,EAHW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAG3B","sourcesContent":["import { IStyle, ITheme } from '@fluentui/react/lib/Styling';\nimport { IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';\nimport { ILegendsProps } from '../Legends/index';\nimport { IAccessibilityProps } from '../../types/index';\nimport { ICalloutProps } from '@fluentui/react/lib/Callout';\n\nexport interface IGaugeChartSegment {\n /**\n * Legend text for a segment\n */\n legend: string;\n\n /**\n * Size of the segment\n */\n size: number;\n\n /**\n * Color of the segment\n */\n color?: string;\n\n /**\n * Accessibility data for the segment\n */\n accessibilityData?: IAccessibilityProps;\n}\n\nexport enum GaugeValueFormat {\n Percentage = 'percentage',\n Fraction = 'fraction',\n}\n\nexport interface IGaugeChartProps {\n /**\n * Width of the chart\n */\n width?: number;\n\n /**\n * Height of the chart\n */\n height?: number;\n\n /**\n * Title of the chart\n */\n chartTitle?: string;\n\n /**\n * Current value of the gauge\n */\n chartValue: number;\n\n /**\n * Sections of the gauge\n */\n segments: IGaugeChartSegment[];\n\n /**\n * Minimum value of the gauge\n * @defaultvalue 0\n */\n minValue?: number;\n\n /**\n * Maximum value of the gauge\n */\n maxValue?: number;\n\n /**\n * Additional text to display below the chart value\n */\n sublabel?: string;\n\n /**\n * Hide the min and max values of the gauge\n * @defaultvalue false\n */\n hideMinMax?: boolean;\n\n /**\n * Format of the chart value\n * @defaultvalue GaugeValueFormat.Percentage\n */\n chartValueFormat?: GaugeValueFormat | ((sweepFraction: number[]) => string);\n\n /**\n * Decides whether to show/hide legends\n * @defaultvalue false\n */\n hideLegend?: boolean;\n\n /*\n * Props for the legends in the chart\n */\n legendProps?: Partial<ILegendsProps>;\n\n /**\n * Do not show tooltips in chart\n * @defaultvalue false\n */\n hideTooltip?: boolean;\n\n /**\n * Additional CSS class(es) to apply to the chart\n */\n className?: string;\n\n /**\n * Theme (provided through customization)\n */\n theme?: ITheme;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules\n */\n styles?: IStyleFunctionOrObject<IGaugeChartStyleProps, IGaugeChartStyles>;\n\n /**\n * Defines the culture to localize the numbers and dates\n */\n culture?: string;\n\n /**\n * Props for the callout in the chart\n */\n calloutProps?: Partial<ICalloutProps>;\n}\n\nexport interface IGaugeChartStyleProps {\n /**\n * Theme (provided through customization)\n */\n theme: ITheme;\n\n /**\n * Font size of the chart value\n */\n chartValueSize?: number;\n\n /**\n * Width of the chart\n */\n chartWidth?: number;\n\n /**\n * Height of the chart\n */\n chartHeight?: number;\n\n /**\n * Additional CSS class(es) to apply to the chart\n */\n className?: string;\n\n /**\n * Color of the line\n */\n lineColor?: string;\n\n /**\n * Boolean flag which determines if shape is drawn in callout\n */\n toDrawShape?: boolean;\n}\n\nexport interface IGaugeChartStyles {\n /**\n * Styles for the root element\n */\n root?: IStyle;\n\n /**\n * Styles for the chart\n */\n chart?: IStyle;\n\n /**\n * Styles for the min and max values\n */\n limits?: IStyle;\n\n /**\n * Styles for the chart value\n */\n chartValue?: IStyle;\n\n /**\n * Styles for the sublabel\n */\n sublabel?: IStyle;\n\n /**\n * Styles for the needle\n */\n needle?: IStyle;\n\n /**\n * Styles for the chart title\n */\n chartTitle?: IStyle;\n\n /**\n * Styles for the segments\n */\n segment?: IStyle;\n\n /**\n * Styles for the legends container\n */\n legendsContainer?: IStyle;\n\n /**\n * Styles for callout root-content\n */\n calloutContentRoot?: IStyle;\n\n /**\n * Styles for callout x-content\n */\n calloutContentX?: IStyle;\n\n /**\n * Styles for callout y-content\n */\n calloutContentY?: IStyle;\n\n /**\n * Styles for description message\n */\n descriptionMessage?: IStyle;\n\n /**\n * Styles for callout Date time container\n */\n calloutDateTimeContainer?: IStyle;\n\n /**\n * Styles for callout info container\n */\n calloutInfoContainer?: IStyle;\n\n /**\n * Styles for callout block container\n */\n calloutBlockContainer?: IStyle;\n\n /**\n * Styles for callout legend text\n */\n calloutlegendText?: IStyle;\n\n /**\n * Styles for the shape object in the callout\n */\n shapeStyles?: IStyle;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './GaugeChart';
2
+ export * from './GaugeChart.types';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./GaugeChart"), exports);
5
+ tslib_1.__exportStar(require("./GaugeChart.types"), exports);
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/GaugeChart/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B;AAC7B,6DAAmC","sourcesContent":["export * from './GaugeChart';\nexport * from './GaugeChart.types';\n"]}
@@ -609,7 +609,7 @@ var LineChartBase = /** @class */ (function (_super) {
609
609
  React.createElement("g", null,
610
610
  _this_1._renderedColorFillBars,
611
611
  _this_1.lines),
612
- eventAnnotationProps && (React.createElement(EventAnnotation_1.EventsAnnotation, tslib_1.__assign({}, eventAnnotationProps, { scale: props.xScale, chartYTop: _this_1.margins.top + _this_1.eventLabelHeight, chartYBottom: props.containerHeight - 35 }))))));
612
+ eventAnnotationProps && (React.createElement(EventAnnotation_1.EventsAnnotation, tslib_1.__assign({ theme: _this_1.props.theme }, eventAnnotationProps, { scale: props.xScale, chartYTop: _this_1.margins.top + _this_1.eventLabelHeight, chartYBottom: props.containerHeight - 35 }))))));
613
613
  } }))) : (React.createElement("div", { id: (0, Utilities_1.getId)('_LineChart_'), role: 'alert', style: { opacity: '0' }, "aria-label": 'Graph has no data to display' }));
614
614
  };
615
615
  LineChartBase.prototype._createLegends = function (data) {