mirror of
https://github.com/apache/superset.git
synced 2026-06-01 21:59:26 +00:00
feat(frontend): Replace ESLint with OXC hybrid linting architecture (#35506)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -70,6 +70,8 @@ export interface CreateDragGraphicOptions {
|
||||
onHeightDrag: (...args: any[]) => any;
|
||||
barWidth: number;
|
||||
chart: any;
|
||||
fillColor?: string;
|
||||
strokeColor?: string;
|
||||
}
|
||||
|
||||
export interface CreateDragGraphicOption {
|
||||
@@ -80,6 +82,8 @@ export interface CreateDragGraphicOption {
|
||||
barWidth: number;
|
||||
chart: any;
|
||||
add: boolean;
|
||||
fillColor?: string;
|
||||
strokeColor?: string;
|
||||
}
|
||||
|
||||
export interface GetDragGraphicPositionOptions {
|
||||
|
||||
@@ -76,6 +76,8 @@ export const createDragGraphicOption = ({
|
||||
barWidth,
|
||||
chart,
|
||||
add,
|
||||
fillColor = 'white',
|
||||
strokeColor = 'gray',
|
||||
}: CreateDragGraphicOption) => {
|
||||
const position = getDragGraphicPosition({
|
||||
chart,
|
||||
@@ -95,10 +97,8 @@ export const createDragGraphicOption = ({
|
||||
y: position[1],
|
||||
invisible: false,
|
||||
style: {
|
||||
// eslint-disable-next-line theme-colors/no-literal-colors
|
||||
fill: '#ffffff',
|
||||
// eslint-disable-next-line theme-colors/no-literal-colors
|
||||
stroke: '#aaa',
|
||||
fill: fillColor,
|
||||
stroke: strokeColor,
|
||||
},
|
||||
cursor: 'ew-resize',
|
||||
draggable: 'horizontal',
|
||||
@@ -129,6 +129,8 @@ export const createDragGraphicOptions = ({
|
||||
onHeightDrag,
|
||||
barWidth,
|
||||
chart,
|
||||
fillColor,
|
||||
strokeColor,
|
||||
}: CreateDragGraphicOptions) => {
|
||||
const graphics: any[] = [];
|
||||
data.forEach((dataItem: number[], dataIndex: number) => {
|
||||
@@ -140,6 +142,8 @@ export const createDragGraphicOptions = ({
|
||||
dataItemIndex: 0,
|
||||
onDrag: onWidthDrag,
|
||||
add: false,
|
||||
fillColor,
|
||||
strokeColor,
|
||||
});
|
||||
graphics.push(widthGraphic);
|
||||
const heightGraphic = createDragGraphicOption({
|
||||
@@ -150,6 +154,8 @@ export const createDragGraphicOptions = ({
|
||||
dataItemIndex: 1,
|
||||
onDrag: onHeightDrag,
|
||||
add: true,
|
||||
fillColor,
|
||||
strokeColor,
|
||||
});
|
||||
graphics.push(heightGraphic);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user