mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
chore(frontend): comprehensive TypeScript quality improvements (#37625)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -339,7 +339,7 @@ export default function EchartsTimeseries({
|
||||
if (echartInstance?.containPixel('grid', pointInPixel)) {
|
||||
// do not trigger if click unstacked chart's blank area
|
||||
if (!stack && params.target?.type === 'ec-polygon') return;
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
const globalModel = echartInstance.getModel();
|
||||
const model = getModelInfo(params.target, globalModel);
|
||||
if (model) {
|
||||
|
||||
@@ -33,7 +33,7 @@ import {
|
||||
// } from '../constants';
|
||||
import { defaultXAxis } from '../defaults';
|
||||
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
export const DEFAULT_FORM_DATA: EchartsTimeseriesFormData = {
|
||||
// ...DEFAULT_LEGEND_FORM_DATA, // TODO: figure out why these break things for stories (e.g. Bubble Chart)
|
||||
// Here are the contents of DEFAULT_LEGEND_FORM_DATA:
|
||||
|
||||
@@ -340,11 +340,11 @@ export function transformSeries(
|
||||
yAxisIndex,
|
||||
name: forecastSeries.name,
|
||||
itemStyle,
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
type: plotType,
|
||||
smooth: seriesType === 'smooth',
|
||||
triggerLineEvent: true,
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
step: ['start', 'middle', 'end'].includes(seriesType as string)
|
||||
? seriesType
|
||||
: undefined,
|
||||
@@ -474,7 +474,7 @@ export function transformIntervalAnnotation(
|
||||
position: 'insideTop',
|
||||
verticalAlign: 'top',
|
||||
fontWeight: 'bold',
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
emphasis: {
|
||||
position: 'insideTop',
|
||||
verticalAlign: 'top',
|
||||
@@ -484,7 +484,6 @@ export function transformIntervalAnnotation(
|
||||
: {
|
||||
show: false,
|
||||
color: theme.colorTextLabel,
|
||||
// @ts-ignore
|
||||
emphasis: {
|
||||
fontWeight: 'bold',
|
||||
show: true,
|
||||
@@ -555,7 +554,7 @@ export function transformEventAnnotation(
|
||||
position: 'insideEndTop',
|
||||
fontWeight: 'bold',
|
||||
formatter: (params: CallbackDataParams) => params.name,
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
emphasis: {
|
||||
backgroundColor: theme.colorPrimaryBgHover,
|
||||
},
|
||||
@@ -564,7 +563,6 @@ export function transformEventAnnotation(
|
||||
show: false,
|
||||
color: theme.colorTextLabel,
|
||||
position: 'insideEndTop',
|
||||
// @ts-ignore
|
||||
emphasis: {
|
||||
formatter: (params: CallbackDataParams) => params.name,
|
||||
fontWeight: 'bold',
|
||||
|
||||
Reference in New Issue
Block a user