(obj, target)
| 284 | } |
| 285 | |
| 286 | function avoidCollision(obj, target) { |
| 287 | if (target) { |
| 288 | // is collision test |
| 289 | while (util.isCollision(obj, target)) { |
| 290 | if (obj.start.x > 0) { |
| 291 | obj.start.y--; |
| 292 | } else if (obj.start.x < 0) { |
| 293 | obj.start.y++; |
| 294 | } else { |
| 295 | if (obj.start.y > 0) { |
| 296 | obj.start.y++; |
| 297 | } else { |
| 298 | obj.start.y--; |
| 299 | } |
| 300 | } |
| 301 | } |
| 302 | } |
| 303 | return obj; |
| 304 | } |
| 305 | |
| 306 | function fillSeries(series, opts, config) { |
| 307 | var index = 0; |