diff --git a/src/components/chart-elements/AreaChart/AreaChart.tsx b/src/components/chart-elements/AreaChart/AreaChart.tsx index 5e4f3da5e..6188c6992 100644 --- a/src/components/chart-elements/AreaChart/AreaChart.tsx +++ b/src/components/chart-elements/AreaChart/AreaChart.tsx @@ -38,6 +38,7 @@ export interface AreaChartProps extends BaseChartProps { stack?: boolean; curveType?: CurveType; connectNulls?: boolean; + showGradient?: boolean; } interface ActiveDot { @@ -75,6 +76,7 @@ const AreaChart = React.forwardRef((props, ref) onValueChange, enableLegendSlider = false, customTooltip, + rotateLabelX, ...other } = props; const CustomTooltip = customTooltip; @@ -181,6 +183,9 @@ const AreaChart = React.forwardRef((props, ref) tickLine={false} axisLine={false} minTickGap={5} + angle={rotateLabelX?.angle} + dy={rotateLabelX?.verticalShift} + height={rotateLabelX?.xAxisHeight} /> ((props, ref) => noDataText, onValueChange, customTooltip, + rotateLabelX, className, enableLegendSlider = false, ...other @@ -177,6 +178,9 @@ const BarChart = React.forwardRef((props, ref) => )} tickLine={false} axisLine={false} + angle={rotateLabelX?.angle} + dy={rotateLabelX?.verticalShift} + height={rotateLabelX?.xAxisHeight} /> ) : ( ((props, ref) => tickFormatter={valueFormatter} minTickGap={5} allowDecimals={allowDecimals} + angle={rotateLabelX?.angle} + dy={rotateLabelX?.verticalShift} + height={rotateLabelX?.xAxisHeight} /> )} {layout !== "vertical" ? ( diff --git a/src/components/chart-elements/LineChart/LineChart.tsx b/src/components/chart-elements/LineChart/LineChart.tsx index 884251fa7..eaecdacb9 100644 --- a/src/components/chart-elements/LineChart/LineChart.tsx +++ b/src/components/chart-elements/LineChart/LineChart.tsx @@ -71,6 +71,7 @@ const LineChart = React.forwardRef((props, ref) onValueChange, enableLegendSlider = false, customTooltip, + rotateLabelX, ...other } = props; const CustomTooltip = customTooltip; @@ -178,6 +179,9 @@ const LineChart = React.forwardRef((props, ref) tickLine={false} axisLine={false} minTickGap={5} + angle={rotateLabelX?.angle} + dy={rotateLabelX?.verticalShift} + height={rotateLabelX?.xAxisHeight} /> void; customTooltip?: React.ComponentType; + rotateLabelX?: { + angle: number; + verticalShift: number; + xAxisHeight: number; + }; } const renderShape = (props: any, activeNode: any | undefined, activeLegend: string | undefined) => { @@ -130,6 +135,7 @@ const ScatterChart = React.forwardRef((props, noDataText, onValueChange, customTooltip, + rotateLabelX, className, enableLegendSlider = false, ...other @@ -235,6 +241,9 @@ const ScatterChart = React.forwardRef((props, minTickGap={5} domain={xAxisDomain as AxisDomain} allowDataOverflow={true} + angle={rotateLabelX?.angle} + dy={rotateLabelX?.verticalShift} + height={rotateLabelX?.xAxisHeight} /> ) : null} {y ? ( diff --git a/src/components/chart-elements/common/BaseChartProps.tsx b/src/components/chart-elements/common/BaseChartProps.tsx index 7e66521f3..b4d6ce2e0 100644 --- a/src/components/chart-elements/common/BaseChartProps.tsx +++ b/src/components/chart-elements/common/BaseChartProps.tsx @@ -25,7 +25,6 @@ interface BaseChartProps extends BaseAnimationTimingProps, React.HTMLAttributes< yAxisWidth?: number; intervalType?: IntervalType; showTooltip?: boolean; - showGradient?: boolean; showLegend?: boolean; showGridLines?: boolean; autoMinValue?: boolean; @@ -36,6 +35,11 @@ interface BaseChartProps extends BaseAnimationTimingProps, React.HTMLAttributes< onValueChange?: (value: EventProps) => void; enableLegendSlider?: boolean; customTooltip?: React.ComponentType; + rotateLabelX?: { + angle: number; + verticalShift: number; + xAxisHeight: number; + }; } export default BaseChartProps; diff --git a/src/components/vis-elements/ProgressCircle/ProgressCircle.tsx b/src/components/vis-elements/ProgressCircle/ProgressCircle.tsx index 3ccf0c5b4..5e38ce177 100644 --- a/src/components/vis-elements/ProgressCircle/ProgressCircle.tsx +++ b/src/components/vis-elements/ProgressCircle/ProgressCircle.tsx @@ -112,7 +112,7 @@ const ProgressCircle = React.forwardRef((pr : "stroke-tremor-brand-muted/50 dark:stroke-dark-tremor-brand-muted", )} /> - {value > 0 ? ( + {value >= 0 ? (