forked from algorithm-visualizer/algorithm-visualizer
-
Notifications
You must be signed in to change notification settings - Fork 0
ChartTracer
Jason Park edited this page Jun 20, 2016
·
2 revisions
ChartTracer inherits Tracer.
| Method | Description |
|---|---|
| ChartTracer((String) name) | create ChartTracer and set its name |
| palette((Object) {selected, notified, default}) | set colors (e.g., {selected: 'green', notified: '#FFA500', default: 'rgb(255,255,255)'}) |
| _setData((Number[]) data) | set one-dimensional array data to visualize |
| _notify((Number) idx, (Number) v) | notify that the value of element idx has been changed to v |
| _denotify((Number) idx) | stop notifying that the value of element idx has been changed |
| _select((Number) s, (Number) e) | select a range between elements s and e |
| _select((Number) idx) | select element idx |
| _deselect((Number) s, (Number) e) | deselect a range between elements s and e |
| _deselect((Number) idx) | deselect element idx |
| _clear() | erase traces on the chart |
| _wait() | wait for a certain amount of time |