Disable chart area hover behavior?
I'm following the charting basic example (https://docs.geocortex.com/essentials/gvh/latest/SamplesViewer/#Charting%20Basics?ChartingBasicsViewModel.ts) .
The chart is created in a custom module and renders fine. The issue is on mouse over the chart appears to be trying to select a feature set?
"Uncaught TypeError: Cannot read property 'features' of null"
b._canExecuteHighlightChartFeatureSet (Mapping.Charting.js:formatted:184)
b.prototype._canExecuteHighlightChartFeatureSet = function(a) {
a = this._convertParameterToFeatureSet(a);
return this.app.command("SetHighlightFillColor").canExecute(void 0) && this.app.command("SetHighlightBorderColor").canExecute(void 0) && this.app.command("HighlightFeatures").canExecute(a.features.get())
}
The error is with "a.features.get()" the "a" variable is null.
I tired disabling everything related to actions on the "RestChartAreaDefinition" interface.
actionSelect: false,
actionPan: false,
actionZoom: false,
actionFeatureDetails: false,
actionRunCommand: false
Is there a way to change or disable the default hover behavior? showToolTips:false ?
I do what the tool tips but I get the feature set highlight error on mouse hover.
0
-
Searched for the correct item and can answer my own question.
In the shell configuration file there are behaviors for the charing module. "HighlightChartFeatureSet" can be removed from the commands list. This prevents the error AND allows the tool tip to show up as expected. Unfortunately this effects all charts for the given site. It would be great if this option was moved to the RestChartAreaDefinition interface."behaviors": [ { "name": "ChartPointMouseHoverBeginBehavior", "event": "ChartPointMouseHoverBeginEvent", "commands": [ "ClearChartHighlights", "HighlightChartFeatureSet" ] },0
Please sign in to leave a comment.
Comments
1 comment