-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Feature/zoom in polar #16992
Feature/zoom in polar #16992
Conversation
File size comparisonSizes for compiled+gzipped (bold) and compiled files.
|
Visual test results - No difference foundSamples changed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the inline comments, I am not sure we need two separate methods (and events) for createSelectionMarker
and getSelectionMarkerAttrs
.
The thing is that the selection marker can either a rect
, path
or arc
. And the attributes are always SVGAttributes
. All of these objects can be created without initial attributes, we we can probably just create one singe extendable function that returns the element type and the attributes. Much like point.shapeType
and point.shapeArgs
.
// make a selection
const selectionMarkerShape = this.getSelectionMarker(chartX, chartY);
if (
(chart.hasCartesianSeries || chart.mapView) &&
(this.zoomX || this.zoomY) &&
clickedInside &&
!panKey
) {
if (!selectionMarker) {
this.selectionMarker = selectionMarker = chart.renderer[selectionMarkerShape.type]()
.attr({
'class': 'highcharts-selection-marker',
zIndex: 7
})
.add();
if (!chart.styledMode) {
selectionMarker.attr({
fill:
chartOptions.selectionMarkerFill ||
color(Palette.highlightColor80)
.setOpacity(0.25).get()
});
}
}
}
if (selectionMarker) {
selectionMarker.attr(
selectionMarkerShape.attribs
);
}
Hello @EWChina999! Sorry for longer response time and thanks for sharing the idea. This ticket is strictly related to polar zoom, so if you don’t mind, please create a separated feature request so we can carry the discussion there: https://github.com/highcharts/highcharts/issues/new/choose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Some more comments. Trying to reduce the filesize impact on highcharts.js
.
ts/Core/Series/Point.ts
Outdated
* @private | ||
* @function Highcharts.Point#determineIsNull | ||
*/ | ||
public determineIsNull(): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That logic is there because the isValid
function is not part of the basic Point object, just some extended objects. So instead of wrapping it, I think we should just implement the function on the basic Point.
public isValid(): boolean {
return this.x !== null && isNumber(this.y);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
@bre1470 could you review too? I see a few |
Yes, I will check. In the meantime please merge the latest master into this branch, so that CI jobs get updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! 👍 See the comments for any
replacements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Looks good. 👍
Added new feature, zooming on polar charts. See #16992.
To do:
http://jsfiddle.net/BlackLabel/3nbyL76q/ - zooming above dataMax doesn't work correctlydeleted, because issue was most likely caused by minRange 0