fix: cluster apis
This commit is contained in:
@@ -22,7 +22,8 @@ const LineChart: React.FC<ChartProps> = (props) => {
|
||||
title,
|
||||
legendOptions,
|
||||
gridOptions,
|
||||
titleOptions
|
||||
titleOptions,
|
||||
showArea
|
||||
} = props;
|
||||
const {
|
||||
grid,
|
||||
@@ -100,19 +101,21 @@ const LineChart: React.FC<ChartProps> = (props) => {
|
||||
lineStyle: {
|
||||
...lineItemConfig.lineStyle,
|
||||
color: item.color
|
||||
}
|
||||
// areaStyle: {
|
||||
// color: new LinearGradient(0, 0, 0, 1, [
|
||||
// {
|
||||
// offset: 0,
|
||||
// color: colors[0]
|
||||
// },
|
||||
// {
|
||||
// offset: 1,
|
||||
// color: colors[1]
|
||||
// }
|
||||
// ])
|
||||
// }
|
||||
},
|
||||
areaStyle: showArea
|
||||
? {
|
||||
color: new LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 0,
|
||||
color: colors[0]
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: colors[1]
|
||||
}
|
||||
])
|
||||
}
|
||||
: null
|
||||
};
|
||||
});
|
||||
return {
|
||||
|
||||
@@ -5,6 +5,7 @@ import type {
|
||||
export interface ChartProps {
|
||||
seriesData: any[];
|
||||
showEmpty?: boolean;
|
||||
showArea?: boolean;
|
||||
xAxisData: string[];
|
||||
legendData?: LegendComponentOption['data'];
|
||||
legendOptions?: {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 20px;
|
||||
gap: 5px;
|
||||
|
||||
&.err {
|
||||
cursor: default;
|
||||
|
||||
@@ -29,6 +29,7 @@ type StatusTagProps = {
|
||||
download?: {
|
||||
percent: number;
|
||||
};
|
||||
suffix?: React.ReactNode;
|
||||
maxTooltipWidth?: number;
|
||||
extra?: React.ReactNode;
|
||||
actions?: {
|
||||
@@ -46,7 +47,7 @@ const StatusTag: React.FC<StatusTagProps> = ({
|
||||
extra,
|
||||
actions = [],
|
||||
maxTooltipWidth = 250,
|
||||
type = 'tag'
|
||||
suffix
|
||||
}) => {
|
||||
const { text, status } = statusValue;
|
||||
|
||||
@@ -140,6 +141,7 @@ const StatusTag: React.FC<StatusTagProps> = ({
|
||||
</div>
|
||||
);
|
||||
}, [statusValue]);
|
||||
|
||||
return (
|
||||
<span
|
||||
className={classNames('status-tag', {
|
||||
@@ -161,14 +163,16 @@ const StatusTag: React.FC<StatusTagProps> = ({
|
||||
}}
|
||||
>
|
||||
<span className="txt err">
|
||||
<span className="m-r-5">
|
||||
<InfoCircleOutlined />
|
||||
</span>
|
||||
<InfoCircleOutlined />
|
||||
{renderContent()}
|
||||
{suffix && <span>{suffix}</span>}
|
||||
</span>
|
||||
</TooltipOverlayScroller>
|
||||
) : (
|
||||
<span className="txt">{renderContent()}</span>
|
||||
<span className="txt">
|
||||
{renderContent()}
|
||||
{suffix && <span>{suffix}</span>}
|
||||
</span>
|
||||
)}
|
||||
</span>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user