Error filling print... null

本文介绍了在使用IReport制作饼图过程中遇到的一个常见问题:饼图数据集标签表达式未设置导致的显示异常。文章详细解释了问题的原因,并给出了具体的解决步骤。

1、错误描述



2、错误原因

IReport的饼图设置dataset中的Label expression时,未设值,导致这里为空,出现错误



3、解决办法

点击上图中的编辑图标,添加Label expression


gapinyc@DESKTOP-9QS7RL5:~/superset-prod/superset-5.0.0/superset-frontend$ npm run build > superset@5.0.0 build > cross-env NODE_OPTIONS=--max_old_space_size=8192 NODE_ENV=production BABEL_ENV="${BABEL_ENV:=production}" webpack --color --mode production [Superset Plugin] Use symlink source for @superset-ui/chart-controls @ ./packages/superset-ui-chart-controls [Superset Plugin] Use symlink source for @superset-ui/core @ ./packages/superset-ui-core [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-calendar @ ./plugins/legacy-plugin-chart-calendar [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-chord @ ./plugins/legacy-plugin-chart-chord [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-country-map @ ./plugins/legacy-plugin-chart-country-map [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-horizon @ ./plugins/legacy-plugin-chart-horizon [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-map-box @ ./plugins/legacy-plugin-chart-map-box [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-paired-t-test @ ./plugins/legacy-plugin-chart-paired-t-test [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-parallel-coordinates @ ./plugins/legacy-plugin-chart-parallel-coordinates [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-partition @ ./plugins/legacy-plugin-chart-partition [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-rose @ ./plugins/legacy-plugin-chart-rose [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-world-map @ ./plugins/legacy-plugin-chart-world-map [Superset Plugin] Use symlink source for @superset-ui/legacy-preset-chart-deckgl @ ./plugins/legacy-preset-chart-deckgl [Superset Plugin] Use symlink source for @superset-ui/legacy-preset-chart-nvd3 @ ./plugins/legacy-preset-chart-nvd3 [Superset Plugin] Use symlink source for @superset-ui/plugin-chart-cartodiagram @ ./plugins/plugin-chart-cartodiagram [Superset Plugin] Use symlink source for @superset-ui/plugin-chart-echarts @ ./plugins/plugin-chart-echarts [Superset Plugin] Use symlink source for @superset-ui/plugin-chart-handlebars @ ./plugins/plugin-chart-handlebars [Superset Plugin] Use symlink source for @superset-ui/plugin-chart-pivot-table @ ./plugins/plugin-chart-pivot-table [Superset Plugin] Use symlink source for @superset-ui/plugin-chart-table @ ./plugins/plugin-chart-table [Superset Plugin] Use symlink source for @superset-ui/plugin-chart-word-cloud @ ./plugins/plugin-chart-word-cloud [Superset Plugin] Use symlink source for @superset-ui/switchboard @ ./packages/superset-ui-switchboard 20% building 1/8 entries 7485/7517 dependencies 696/3486 modules`isModuleDeclaration` has been deprecated, please migrate to `isImportOrExportDeclaration` at isModuleDeclaration (/home/gapinyc/superset-prod/superset-5.0.0/superset-frontend/node_modules/@babel/types/lib/validators/generated/index.js:2793:35) at PluginPass.Program (/home/gapinyc/superset-prod/superset-5.0.0/superset-frontend/node_modules/babel-plugin-lodash/lib/index.js:102:44) 1146 assets 12873 modules WARNING in ./src/components/Tooltip/index.tsx 22:0-42 export 'TooltipPlacement' (reexported as 'TooltipPlacement') was not found in 'antd-v5/lib/tooltip' (possible exports: __esModule, default) WARNING in ./src/components/Tooltip/index.tsx 22:0-42 export 'TooltipProps' (reexported as 'TooltipProps') was not found in 'antd-v5/lib/tooltip' (possible exports: __esModule, default) ERROR in ./plugins/plugin-chart-handlebars/node_modules/just-handlebars-helpers/lib/helpers/formatters.js 27:24-55 Module not found: Error: Can't resolve 'currencyformatter.js' in '/home/gapinyc/superset-prod/superset-5.0.0/superset-frontend/plugins/plugin-chart-handlebars/node_modules/just-handlebars-helpers/lib/helpers' ERROR in ./node_modules/@luma.gl/webgl/dist/adapter/webgl-adapter.js 65:38-62 Module not found: Error: Can't resolve './webgl-device' in '/home/gapinyc/superset-prod/superset-5.0.0/superset-frontend/node_modules/@luma.gl/webgl/dist/adapter' Did you mean 'webgl-device.js'? BREAKING CHANGE: The request './webgl-device' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request. ERROR in ./node_modules/@deck.gl/core/src/controllers/controller.ts:21:24 TS7006: Parameter 't' implicitly has an 'any' type. 19 | 20 | const DEFAULT_INERTIA = 300; > 21 | const INERTIA_EASING = t => 1 - (1 - t) * (1 - t); | ^ 22 | 23 | const EVENT_TYPES = { 24 | WHEEL: ['wheel'], ERROR in ./node_modules/@deck.gl/core/src/controllers/controller.ts:114:3 TS2578: Unused '@ts-expect-error' directive. 112 | abstract get transition(): TransitionProps; 113 | > 114 | // @ts-expect-error (2564) - not assigned in the constructor | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 115 | protected props: ControllerProps; 116 | protected state: Record<string, any> = {}; 117 | ERROR in ./node_modules/@deck.gl/core/src/controllers/controller.ts:173:7 TS7032: Property 'events' implicitly has type 'any', because its set accessor lacks a parameter type annotation. 171 | } 172 | > 173 | set events(customEvents) { | ^^^^^^ 174 | this.toggleEvents(this._customEvents, false); 175 | this.toggleEvents(customEvents, true); 176 | this._customEvents = customEvents; ERROR in ./node_modules/@deck.gl/core/src/controllers/controller.ts:173:14 TS7006: Parameter 'customEvents' implicitly has an 'any' type. 171 | } 172 | > 173 | set events(customEvents) { | ^^^^^^^^^^^^ 174 | this.toggleEvents(this._customEvents, false); 175 | this.toggleEvents(customEvents, true); 176 | this._customEvents = customEvents; ERROR in ./node_modules/@deck.gl/core/src/controllers/controller.ts:338:16 TS7006: Parameter 'eventNames' implicitly has an 'any' type. 336 | } 337 | > 338 | toggleEvents(eventNames, enabled) { | ^^^^^^^^^^ 339 | if (this.eventManager) { 340 | eventNames.forEach(eventName => { 341 | if (this._events[eventName] !== enabled) { ERROR in ./node_modules/@deck.gl/core/src/controllers/controller.ts:338:28 TS7006: Parameter 'enabled' implicitly has an 'any' type. 336 | } 337 | > 338 | toggleEvents(eventNames, enabled) { | ^^^^^^^ 339 | if (this.eventManager) { 340 | eventNames.forEach(eventName => { 341 | if (this._events[eventName] !== enabled) { ERROR in ./node_modules/@deck.gl/core/src/controllers/controller.ts:340:26 TS7006: Parameter 'eventName' implicitly has an 'any' type. 338 | toggleEvents(eventNames, enabled) { 339 | if (this.eventManager) { > 340 | eventNames.forEach(eventName => { | ^^^^^^^^^ 341 | if (this._events[eventName] !== enabled) { 342 | this._events[eventName] = enabled; 343 | if (enabled) { ERROR in ./node_modules/@deck.gl/core/src/controllers/controller.ts:484:29 TS7006: Parameter 'event' implicitly has an 'any' type. 482 | } 483 | > 484 | protected _onPanRotateEnd(event): boolean { | ^^^^^ 485 | const {inertia} = this; 486 | if (this.dragRotate && inertia && event.velocity) { 487 | const pos = this.getCenter(event); ERROR in ./node_modules/@deck.gl/core/src/controllers/map-controller.ts:406:19 TS7006: Parameter 'scale' implicitly has an 'any' type. 404 | /* Private methods */ 405 | > 406 | _zoomFromCenter(scale) { | ^^^^^ 407 | const {width, height} = this.getViewportProps(); 408 | return this.zoom({ 409 | pos: [width / 2, height / 2], ERROR in ./node_modules/@deck.gl/core/src/controllers/map-controller.ts:414:18 TS7006: Parameter 'offset' implicitly has an 'any' type. 412 | } 413 | > 414 | _panFromCenter(offset) { | ^^^^^^ 415 | const {width, height} = this.getViewportProps(); 416 | return this.pan({ 417 | startPos: [width / 2, height / 2], ERROR in ./node_modules/@deck.gl/core/src/controllers/map-controller.ts:422:20 TS7006: Parameter 'newProps' implicitly has an 'any' type. 420 | } 421 | > 422 | _getUpdatedState(newProps): MapState { | ^^^^^^^^ 423 | // @ts-ignore 424 | return new this.constructor({ 425 | makeViewport: this.makeViewport, ERROR in ./node_modules/@deck.gl/core/src/controllers/transition-manager.ts:40:24 TS7006: Parameter 't' implicitly has an 'any' type. 38 | }; 39 | > 40 | const DEFAULT_EASING = t => t; | ^ 41 | const DEFAULT_INTERRUPTION = TRANSITION_EVENTS.BREAK; 42 | 43 | type TransitionSettings = BaseTransitionSettings & { ERROR in ./node_modules/@deck.gl/core/src/controllers/transition-manager.ts:209:12 TS7006: Parameter 'transition' implicitly has an 'any' type. 207 | 208 | _onTransitionEnd(callback?: (transition: Transition) => void) { > 209 | return transition => { | ^^^^^^^^^^ 210 | this.propsInTransition = null; 211 | 212 | this.onStateChange({ ERROR in ./node_modules/@deck.gl/core/src/controllers/transition-manager.ts:223:25 TS7006: Parameter 'transition' implicitly has an 'any' type. 221 | } 222 | > 223 | _onTransitionUpdate = transition => { | ^^^^^^^^^^ 224 | // NOTE: Be cautious re-ordering statements in this function. 225 | const { 226 | time, ERROR in ./node_modules/@deck.gl/core/src/lib/view-manager.ts:161:7 TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'. No index signature with a parameter of type 'string' was found on type '{}'. 159 | const viewMap = {}; 160 | this.views.forEach(view => { > 161 | viewMap[view.id] = view; | ^^^^^^^^^^^^^^^^ 162 | }); 163 | return viewMap; 164 | } ERROR in ./node_modules/@deck.gl/core/src/lib/view-manager.ts:180:32 TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'ViewStateObject<ViewsT>'. No index signature with a parameter of type 'string' was found on type 'ViewStateObject<ViewsT>'. 178 | typeof viewOrViewId === 'string' ? this.getView(viewOrViewId) : viewOrViewId; 179 | // Backward compatibility: view state for single view > 180 | const viewState = (view && this.viewState[view.getViewStateId()]) || this.viewState; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 181 | return view ? view.filterViewState(viewState) : viewState; 182 | } 183 | ERROR in ./node_modules/@deck.gl/core/src/lib/view-manager.ts:269:5 TS2322: Type 'unknown[]' is not assignable to type 'View<TransitionProps, CommonViewProps<TransitionProps>>[]'. Type 'unknown' is not assignable to type 'View<TransitionProps, CommonViewProps<TransitionProps>>'. 267 | // Does not actually rebuild the `Viewport`s until `getViewports` is called 268 | private _setViews(views: View[]): void { > 269 | views = flatten(views, Boolean); | ^^^^^ 270 | 271 | const viewsChanged = this._diffViews(views, this.views); 272 | if (viewsChanged) { ERROR in ./node_modules/@deck.gl/core/src/lib/view-manager.ts:306:21 TS7006: Parameter 'viewState' implicitly has an 'any' type. 304 | onViewStateChange: this._eventCallbacks.onViewStateChange, 305 | onStateChange: this._eventCallbacks.onInteractionStateChange, > 306 | makeViewport: viewState => | ^^^^^^^^^ 307 | this.getView(view.id)?.makeViewport({ 308 | viewState, 309 | width: this.width, ERROR in ./node_modules/@deck.gl/core/src/transitions/linear-interpolator.ts:100:7 TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'. No index signature with a parameter of type 'string' was found on type '{}'. 98 | const propsInTransition = {}; 99 | for (const key of this._propsToExtract) { > 100 | propsInTransition[key] = lerp(startProps[key] || 0, endProps[key] || 0, t); | ^^^^^^^^^^^^^^^^^^^^^^ 101 | } 102 | 103 | if (endProps.aroundPosition && this.opts.makeViewport) { ERROR in ./node_modules/@deck.gl/core/src/transitions/transition-interpolator.ts:66:9 TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'. No index signature with a parameter of type 'string' was found on type '{}'. 64 | for (const key of this._propsToExtract) { 65 | if (key in startProps || key in endProps) { > 66 | startViewStateProps[key] = startProps[key]; | ^^^^^^^^^^^^^^^^^^^^^^^^ 67 | endViewStateProps[key] = endProps[key]; 68 | } 69 | } ERROR in ./node_modules/@deck.gl/core/src/transitions/transition-interpolator.ts:67:9 TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'. No index signature with a parameter of type 'string' was found on type '{}'. 65 | if (key in startProps || key in endProps) { 66 | startViewStateProps[key] = startProps[key]; > 67 | endViewStateProps[key] = endProps[key]; | ^^^^^^^^^^^^^^^^^^^^^^ 68 | } 69 | } 70 | ERROR in ./node_modules/@deck.gl/core/src/transitions/transition-interpolator.ts:100:23 TS7006: Parameter 'props' implicitly has an 'any' type. 98 | } 99 | > 100 | _checkRequiredProps(props) { | ^^^^^ 101 | if (!this._requiredProps) { 102 | return; 103 | } ERROR in ./node_modules/@deck.gl/core/src/types/types.ts:10:8 TS7019: Rest parameter 'args' implicitly has an 'any[]' type. 8 | 9 | export interface ConstructorOf<T> { > 10 | new (...args): T; | ^^^^^^^ 11 | } 12 | ERROR in ./node_modules/@deck.gl/core/src/utils/flatten.ts:44:28 TS7031: Binding element 'target' implicitly has an 'any' type. 42 | 43 | /** Uses copyWithin to significantly speed up typed array value filling */ > 44 | export function fillArray({target, source, start = 0, count = 1}) { | ^^^^^^ 45 | const length = source.length; 46 | const total = count * length; 47 | let copied = 0; ERROR in ./node_modules/@deck.gl/core/src/utils/flatten.ts:44:36 TS7031: Binding element 'source' implicitly has an 'any' type. 42 | 43 | /** Uses copyWithin to significantly speed up typed array value filling */ > 44 | export function fillArray({target, source, start = 0, count = 1}) { | ^^^^^^ 45 | const length = source.length; 46 | const total = count * length; 47 | let copied = 0; ERROR in ./node_modules/@deck.gl/core/src/utils/math-utils.ts:100:5 TS7034: Variable 'scratchArray' implicitly has type 'any' in some locations where its type cannot be determined. 98 | } 99 | > 100 | let scratchArray; | ^^^^^^^^^^^^ 101 | 102 | /** 103 | * Split a Float64Array into a double-length Float32Array ERROR in ./node_modules/@deck.gl/core/src/utils/math-utils.ts:121:45 TS7005: Variable 'scratchArray' implicitly has an 'any' type. 119 | 120 | const count = (endIndex - startIndex) / size; > 121 | scratchArray = typedArrayManager.allocate(scratchArray, count, { | ^^^^^^^^^^^^ 122 | type: Float32Array, 123 | size: size * 2 124 | }); ERROR in ./node_modules/@deck.gl/core/src/views/view.ts:155:11 TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'TransitionProps'. No index signature with a parameter of type 'string' was found on type 'TransitionProps'. 153 | for (const key in this.props.viewState) { 154 | if (key !== 'id') { > 155 | newViewState[key] = this.props.viewState[key]; | ^^^^^^^^^^^^^^^^^ 156 | } 157 | } 158 | return newViewState; ERROR in ./node_modules/@deck.gl/core/src/views/view.ts:155:31 TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ id?: string | undefined; } & Partial<ViewState>'. No index signature with a parameter of type 'string' was found on type '{ id?: string | undefined; } & Partial<ViewState>'. 153 | for (const key in this.props.viewState) { 154 | if (key !== 'id') { > 155 | newViewState[key] = this.props.viewState[key]; | ^^^^^^^^^^^^^^^^^^^^^^^^^ 156 | } 157 | } 158 | return newViewState; webpack 5.102.1 compiled with 31 errors and 2 warnings in 40499 ms
最新发布
10-24
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值