RemoveGraph removes and disposes of the specified graph from the chart
(g *Graph)
| 305 | |
| 306 | // RemoveGraph removes and disposes of the specified graph from the chart |
| 307 | func (ch *Chart) RemoveGraph(g *Graph) { |
| 308 | |
| 309 | ch.Remove(g) |
| 310 | g.Dispose() |
| 311 | for pos, current := range ch.graphs { |
| 312 | if current == g { |
| 313 | copy(ch.graphs[pos:], ch.graphs[pos+1:]) |
| 314 | ch.graphs[len(ch.graphs)-1] = nil |
| 315 | ch.graphs = ch.graphs[:len(ch.graphs)-1] |
| 316 | break |
| 317 | } |
| 318 | } |
| 319 | if !ch.autoY { |
| 320 | return |
| 321 | } |
| 322 | ch.updateGraphs() |
| 323 | } |
| 324 | |
| 325 | // updateLabelsX updates the X scale labels text |
| 326 | func (ch *Chart) updateLabelsX() { |
nothing calls this directly
no test coverage detected