Commits

Anonymous committed 75e86c6

change format of data-colors attr

  • Participants
  • Parent commits 51783eb

Comments (0)

Files changed (1)

File htraf/jquery.htraf.js

         // if colors attr was specified include it other wise don't
         if ( this.element.attr('data-colors') != undefined )
         {
-            attrs.seriesColors = eval(this.element.attr('data-colors'));
+            attrs.seriesColors = this.element.attr('data-colors').split(' ');
             this.assert((attrs.seriesColors instanceof Array),
-                    "Unsupported chart color specification. \n\ndata-colors must be of form: \n"
-                    + "['red','green','blue']");
+                    "Unsupported chart color specification. \n\ndata-colors must be space separated list of colors, either color names or #FFFFFF: \n"
+                    + "red green blue");
         }
         this.assert($.inArray(attrs.type, this.supportedType) != -1,
                     "Unsupported chart type. \n\nPossible values: \n"