1. Chris Leonello
  2. jqplot
Issue #285 new

Added so formatString for highlighter can be a function

Anonymous created an issue

I needed to create different strings for different series so I modified the following so a function can be specified for the formatString.

{{{

!Javascript

208,211d207 < var fmtstr = hl.formatString; < if (typeof(hl.formatString)=="function") { < fmtstr = hl.formatString(plot, series, neighbor, xfstr, yfstr, xstr, ystrs, hl); < } 216,217c212 < // ystrs.unshift(hl.formatString); < ystrs.unshift(fmtstr);


                    ystrs.unshift(hl.formatString);

222,223c217 < // ystrs.unshift(hl.formatString); < ystrs.unshift(fmtstr);


                    ystrs.unshift(hl.formatString);

227,228c221 < // str = $.jqplot.sprintf.apply($.jqplot.sprintf, [hl.formatString, xstr]); < str = $.jqplot.sprintf.apply($.jqplot.sprintf, [fmtstr, xstr]);


                    str = $.jqplot.sprintf.apply($.jqplot.sprintf, [hl.formatString, xstr]);

231,232c224 < // ystrs.unshift(hl.formatString); < ystrs.unshift(fmtstr);


                    ystrs.unshift(hl.formatString);

237,238c229 < // ystrs.unshift(hl.formatString); < ystrs.unshift(fmtstr);


                    ystrs.unshift(hl.formatString);

}}}

/Jonas

Comments (2)

  1. Anonymous

    That is useful I think. It has not been added since now?

    For example, ist it possible to display the weekday of the datapoint (if I am using the DateAxisRenderer)? like this data..."12.01.2010",50... at highlighting it then displays "Di 12. Januar 2010: 50 whatever" somehow specify of course to use your own Weekday abbreviations(local ones)

  2. Anonymous

    Looks like a fix two days ago solved my issue. I just want an official release with the feature.

    /Jonas

  3. Log in to comment