Ovilia commented on code in PR #17212:
URL: https://github.com/apache/echarts/pull/17212#discussion_r896334831
##########
src/coord/axisCommonTypes.ts:
##########
@@ -162,7 +163,7 @@ export interface TimeAxisBaseOption extends
NumericAxisBaseOptionCommon {
type?: 'time';
axisLabel?: AxisLabelOption<'time'>;
}
-interface AxisNameTextStyleOption extends TextCommonOption {
+interface AxisNameTextStyleOption extends TextCommonOption,
Pick<TextStyleProps, 'overflow'| 'ellipsis'> {
Review Comment:
This should probably be `Partial<Pick<...>>` because `overflow` and
`ellipsis` is optional. There should be a space before the `|`.
##########
src/component/axis/AxisBuilder.ts:
##########
@@ -421,9 +421,11 @@ const builders: Record<'axisLine' | 'axisTickLabel' |
'axisName', AxisElementsBu
const textFont = textStyleModel.getFont();
const truncateOpt = axisModel.get('nameTruncate', true) || {};
- const ellipsis = truncateOpt.ellipsis;
+ const ellipsis = textStyleModel.get('ellipsis') ||
truncateOpt.ellipsis;
+ const overflow = textStyleModel.get('overflow') || 'none';
const maxWidth = retrieve(
- opt.nameTruncateMaxWidth, truncateOpt.maxWidth,
axisNameAvailableWidth
+ opt.nameTruncateMaxWidth, truncateOpt.maxWidth,
axisNameAvailableWidth,
+ Math.abs(extent[1] - extent[0]) // Current axis length.
Review Comment:
This seems to be a good idea. Can we also have a test case on the polar
system?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]