src/widgets/Sparkline.js
branchnew-model
changeset 876 03967b6ada7c
parent 875 43629caa77bc
child 957 4da0a5740b6c
child 1019 3ab36f402b0c
equal deleted inserted replaced
875:43629caa77bc 876:03967b6ada7c
    16 
    16 
    17 IriSP.Widgets.Sparkline.prototype.draw = function() {
    17 IriSP.Widgets.Sparkline.prototype.draw = function() {
    18     var _slices = [],
    18     var _slices = [],
    19         _duration = this.source.getDuration(),
    19         _duration = this.source.getDuration(),
    20         _max = 0,
    20         _max = 0,
    21         _list = this.annotation_type ? this.source.getAnnotationsByTypeTitle(this.annotation_type) : this.source.getAnnotations();
    21         _list = this.getWidgetAnnotations();
    22     
    22     
    23     for (var _i = 0; _i < this.slice_count; _i++) {
    23     for (var _i = 0; _i < this.slice_count; _i++) {
    24         var _begin = new IriSP.Model.Time(_i*_duration/this.slice_count),
    24         var _begin = new IriSP.Model.Time(_i*_duration/this.slice_count),
    25             _end = new IriSP.Model.Time((_i+1)*_duration/this.slice_count),
    25             _end = new IriSP.Model.Time((_i+1)*_duration/this.slice_count),
    26             _annotations = _list.filter(function(_annotation) {
    26             _annotations = _list.filter(function(_annotation) {