fix(charts): big-number display broken in echarts (#24492)

Co-authored-by: aadhikari <aadhikari@apple.com>
This commit is contained in:
curious86
2023-06-27 10:59:24 -07:00
committed by GitHub
parent 0ddc0a6738
commit 3f17945745
26 changed files with 250 additions and 111 deletions

View File

@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t, ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core';
import { t, Behavior } from '@superset-ui/core';
import controlPanel from './controlPanel';
import transformProps from './transformProps';
import buildQuery from './buildQuery';
@@ -24,8 +24,9 @@ import example1 from './images/BigNumber.jpg';
import example2 from './images/BigNumber2.jpg';
import thumbnail from './images/thumbnail.png';
import { BigNumberTotalChartProps, BigNumberTotalFormData } from '../types';
import { EchartsChartPlugin } from '../../types';
const metadata = new ChartMetadata({
const metadata = {
category: t('KPI'),
description: t(
'Showcases a single metric front-and-center. Big number is best used to call attention to a KPI or the one thing you want your audience to focus on.',
@@ -46,9 +47,9 @@ const metadata = new ChartMetadata({
],
thumbnail,
behaviors: [Behavior.DRILL_TO_DETAIL],
});
};
export default class BigNumberTotalChartPlugin extends ChartPlugin<
export default class BigNumberTotalChartPlugin extends EchartsChartPlugin<
BigNumberTotalFormData,
BigNumberTotalChartProps
> {