sag_components 1.0.928 → 1.0.930

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.
@@ -251,8 +251,13 @@ const SingleBarLineCharts = props => {
251
251
  type: "number",
252
252
  width: 0,
253
253
  display: "none",
254
- domain: ['auto', dataMax => dataMax * maxRange],
255
- allowDataOverflow: true
254
+ allowDataOverflow: true,
255
+ domain: ['auto', dataMax => {
256
+ if (String(dataMax) === '-Infinity') {
257
+ return 0;
258
+ }
259
+ return dataMax * maxRange;
260
+ }]
256
261
  }), /*#__PURE__*/_react.default.createElement(_recharts.ReferenceLine, {
257
262
  y: 0,
258
263
  stroke: "#D0D0D0"
@@ -296,7 +301,7 @@ SingleBarLineCharts.defaultProps = {
296
301
  isLineChartBolded: false,
297
302
  setLineChartTooltip: false,
298
303
  isTopBarPercent: true,
299
- maxRange: 1,
304
+ maxRange: 0.1,
300
305
  showPeriod: true,
301
306
  currencySign: '€',
302
307
  currencySignLine: '€',
@@ -25,6 +25,8 @@ const TotalHorizontalCharts = props => {
25
25
  currencySign,
26
26
  currencyType,
27
27
  chartsData,
28
+ labelFontSize,
29
+ labelLimitedLetters,
28
30
  width,
29
31
  height,
30
32
  rightGap,
@@ -108,18 +110,17 @@ const TotalHorizontalCharts = props => {
108
110
  style: {
109
111
  whiteSpace: 'nowrap'
110
112
  },
111
- width: "15px",
112
113
  height: height,
113
114
  x: 20,
114
115
  y: y,
115
- fontSize: 10,
116
+ fontSize: labelFontSize,
116
117
  orientation: orientation,
117
118
  stroke: stroke,
118
119
  textAnchor: "start"
119
120
  // verticalAnchor="middle"
120
121
  ,
121
122
  fill: fill
122
- }, payload.value.length > 11 ? `${payload.value.slice(0, 11)}...` : payload.value));
123
+ }, payload.value.length > labelLimitedLetters - 1 ? `${payload.value.slice(0, labelLimitedLetters)}...` : payload.value));
123
124
  }
124
125
  return null;
125
126
  }
@@ -176,7 +177,10 @@ const TotalHorizontalCharts = props => {
176
177
  }, /*#__PURE__*/_react.default.createElement(_recharts.LabelList, {
177
178
  dataKey: "value",
178
179
  content: CustomizedLabel
179
- }), chartsData.map((entry, index) => /*#__PURE__*/_react.default.createElement(_recharts.Cell, {
180
+ }), chartsData.map((entry, index) =>
181
+ /*#__PURE__*/
182
+ // eslint-disable-next-line react/no-array-index-key
183
+ _react.default.createElement(_recharts.Cell, {
180
184
  key: `cell-${index}`,
181
185
  fill: barBackgrounds[index % 20]
182
186
  }))), showLegendTooltip && /*#__PURE__*/_react.default.createElement(_TspanTooltip.default, {
@@ -201,6 +205,8 @@ TotalHorizontalCharts.defaultProps = {
201
205
  currencySign: false,
202
206
  currencyType: 'USD',
203
207
  chartsData: [],
208
+ labelFontSize: 10,
209
+ labelLimitedLetters: 12,
204
210
  width: '100%',
205
211
  height: '100%',
206
212
  rightGap: 1.25,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.928",
3
+ "version": "1.0.930",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {