Skip to content

Commit bfcead5

Browse files
committed
change option to axisPointer.alwaysShowContent
1 parent c5d86d3 commit bfcead5

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

src/component/axisPointer/axisTrigger.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ export default function axisTrigger(
166166
each(coordSysAxesInfo.coordSysAxesInfo[coordSysKey], function (axisInfo, key) {
167167
// Allow connected charts to bypass illegalPoint check and always show shared
168168
// axisPointer regardless of series data.
169-
const isAlwaysShow = axisInfo.axisPointerModel.get('show') === 'always';
169+
const isAlwaysShowContent = axisInfo.axisPointerModel.get('alwaysShowContent');
170170
const axis = axisInfo.axis;
171171
const inputAxisInfo = findInputAxisInfo(inputAxesInfo, axisInfo);
172172
// If no inputAxesInfo, no axis is restricted.
173-
if (isAlwaysShow || !shouldHide && coordSysContainsPoint && (!inputAxesInfo || inputAxisInfo)) {
173+
if (isAlwaysShowContent || !shouldHide && coordSysContainsPoint && (!inputAxesInfo || inputAxisInfo)) {
174174
let val = inputAxisInfo && inputAxisInfo.value;
175175
if (val == null && !isIllegalPoint) {
176176
val = axis.pointToData(point);

src/util/types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,9 @@ type LabelFormatterParams = {
16601660
* Common axis option. can be configured on each axis
16611661
*/
16621662
export interface CommonAxisPointerOption {
1663-
show?: boolean | 'auto' | 'always'
1663+
show?: boolean | 'auto'
1664+
1665+
alwaysShowContent?: boolean
16641666

16651667
z?: number;
16661668
zlevel?: number;

test/axis-pointer-sync.html

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)