I have a scatterChart that is finally working reasonably well. I even found out how to hook into the legend events to update a list of selected groups based upon the legend checkboxes. I can also programmatically turn groups on or off using data[groupIndex].disabled. That's all working great, and I can turn groups on or off just by manipulating data.
Now I want to turn the line on or off. Turning the line on is easy: I simply set:
Note that for groups I have turned off, if I turn off the line (i.e. delete the slope and intercept) and then show those other groups, they do not draw lines. But even if I turn a group off, its line stays. In other words, once a group has drawn a line, nothing I can do with the data can make the line disappear.
Note that if I manually call $scope.api.refresh() as indicated in #37 after removing the slope/intercept, the line disappears --- but the entire chart flashes, which is jarring and ugly.
This looks like a bug to me. Anybody know any workarounds for turning off a line once it has been painted, without manually refreshing the whole chart (or at least without the flashing)?
I have a
scatterChart
that is finally working reasonably well. I even found out how to hook into the legend events to update a list of selected groups based upon the legend checkboxes. I can also programmatically turn groups on or off usingdata[groupIndex].disabled
. That's all working great, and I can turn groups on or off just by manipulatingdata
.Now I want to turn the line on or off. Turning the line on is easy: I simply set:
And that works like a charm! However, when I click the UI checkbox to turn off the line, I go back and update the same data:
But the line stays on the screen!
Note that for groups I have turned off, if I turn off the line (i.e. delete the slope and intercept) and then show those other groups, they do not draw lines. But even if I turn a group off, its line stays. In other words, once a group has drawn a line, nothing I can do with the data can make the line disappear.
Note that if I manually call
$scope.api.refresh()
as indicated in #37 after removing the slope/intercept, the line disappears --- but the entire chart flashes, which is jarring and ugly.This looks like a bug to me. Anybody know any workarounds for turning off a line once it has been painted, without manually refreshing the whole chart (or at least without the flashing)?