-
Notifications
You must be signed in to change notification settings - Fork 19.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Callback for series-tree.symbol not defined in typescript #17946
Comments
Seems like the problems comes from the definition of the interface of interface TreeSeriesOption extends SeriesOption<TreeSeriesStateOption, TreeStatesMixin>, TreeSeriesStateOption, SymbolOptionMixin, BoxLayoutOptionMixin, RoamOptionMixin {
type?: 'tree';
layout?: 'orthogonal' | 'radial';
edgeShape?: 'polyline' | 'curve';
/**
* Available when edgeShape is polyline
*/
edgeForkPosition?: string | number;
nodeScaleRatio?: number;
/**
* The orient of orthoginal layout, can be setted to 'LR', 'TB', 'RL', 'BT'.
* and the backward compatibility configuration 'horizontal = LR', 'vertical = TB'.
*/
orient?: 'LR' | 'TB' | 'RL' | 'BT' | 'horizontal' | 'vertical';
expandAndCollapse?: boolean;
/**
* The initial expanded depth of tree
*/
initialTreeDepth?: number;
leaves?: TreeSeriesLeavesOption;
data?: TreeSeriesNodeItemOption[];
} In the interface SymbolOptionMixin<T = never> {
/**
* type of symbol, like `cirlce`, `rect`, or custom path and image.
*/
symbol?: string | (T extends never ? never : SymbolCallback<T>);
/**
* Size of symbol.
*/
symbolSize?: number | number[] | (T extends never ? never : SymbolSizeCallback<T>);
symbolRotate?: number | (T extends never ? never : SymbolRotateCallback<T>);
symbolKeepAspect?: boolean;
symbolOffset?: string | number | (string | number)[] | (T extends never ? never : SymbolOffsetCallback<T>);
} Maybe setting the |
It seems the callback function itself is working ( |
This issue is labeled with Please have a look at How to debug ECharts if you'd like to give a try. 🤓 |
fix(tree): change symbol type. close #17946
Version
5.4.0
Link to Minimal Reproduction
https://echarts.apache.org/examples/en/editor.html?c=tree-polyline&lang=ts&code=MYewdgzgLgBAJgQygmBeGBvAUDGYEC2ApgFwwDkAZgDYIBOR5ANDjMABYCW1cDYZAbVa5suMXk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HgGSIEFG_DVCeycc0P1G1Q1BpDZWIYPNTRkBCN2X0Y82FYE4UAA
Steps to Reproduce
Using example from official website Tree with polylines, set symbol parameter in the series to a callback:
Documentation reference: https://echarts.apache.org/en/option.html#series-tree.symbol
Current Behavior
The callback works but there is a typescript error :
Expected Behavior
The callback should be allowed in the type definition of series-tree.symbol and other items that accept callbacks.
Environment
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: