sag_components 2.0.0-beta95 → 2.0.0-beta96

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/dist/index.esm.js CHANGED
@@ -28802,7 +28802,7 @@ const DoubleBarSingleLine = props => {
28802
28802
  width,
28803
28803
  height,
28804
28804
  title,
28805
- hasScroll,
28805
+ //hasScroll,
28806
28806
  dataState,
28807
28807
  data,
28808
28808
  lineType,
@@ -29005,21 +29005,32 @@ const DoubleBarSingleLine = props => {
29005
29005
  }));
29006
29006
  };
29007
29007
  const transformedData = transformDataForLineChart(data);
29008
+
29009
+ // Calculate responsive width based on container size and zoom
29010
+ const itemWidth = 178; // Base item width at 100% zoom
29011
+ const itemsCanFit = Math.floor(containerWidth / itemWidth);
29012
+ const needsScroll = data.length > itemsCanFit;
29013
+ const dynamicWidth = needsScroll ? `${data.length * itemWidth}px` : '100%';
29008
29014
  return /*#__PURE__*/React$1.createElement(DoubleBarSingleLineContainer, {
29009
29015
  ref: containerRef,
29010
29016
  className: className,
29011
29017
  height: height,
29012
29018
  width: width,
29013
- hasScroll: hasScroll
29019
+ hasScroll: needsScroll
29014
29020
  }, data.length === 0 ? /*#__PURE__*/React$1.createElement(NoDataFoundMessage, {
29015
29021
  noDataText: noDataText
29016
29022
  }) : /*#__PURE__*/React$1.createElement(Controls$6, {
29017
29023
  className: "Controls"
29018
29024
  }, title && title.trim() !== '' && /*#__PURE__*/React$1.createElement(Title$8, null, title), /*#__PURE__*/React$1.createElement(ChartsWrapper, {
29019
- width: hasScroll ? `${data.length * 178}px` : 'auto'
29025
+ width: dynamicWidth //{hasScroll ? `${data.length * 178}px` : 'auto'}
29020
29026
  }, /*#__PURE__*/React$1.createElement(LineChartWrapper, null, /*#__PURE__*/React$1.createElement(ResponsiveContainer, null, /*#__PURE__*/React$1.createElement(LineChart, _extends({
29021
29027
  data: transformedData
29022
- }, syncCharts), /*#__PURE__*/React$1.createElement(XAxis, {
29028
+ }, syncCharts, {
29029
+ margin: {
29030
+ ...syncCharts.margin,
29031
+ top: 20
29032
+ }
29033
+ }), /*#__PURE__*/React$1.createElement(XAxis, {
29023
29034
  dataKey: "label",
29024
29035
  tick: false,
29025
29036
  axisLine: false,