Changeset 14979 for trunk/FACT++/www


Ignore:
Timestamp:
03/04/13 17:06:17 (12 years ago)
Author:
tbretz
Message:
Added the possibility to have colored lines in graphics; adaptes culmination and current prediction accordingly -- maybe colors still need adaption.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/www/smartfact/index.js

    r14677 r14979  
    10911091            form = "—";
    10921092
     1093        form = form.replace(/<B#(.*?)>/g, "<b style='background:#$1'>");
    10931094        form = form.replace(/<#(.*?)>/g, "<font color='$1'>");
    10941095        form = form.replace(/<([\+-])>/g, "<font size='$11'>");
     
    14301431
    14311432    ctx.strokeStyle = "#666";
     1433    ctx.fillStyle = "#"+color(100);
    14321434
    14331435    // --- data ---
     
    14351437    for (var j=1; j<data.length; j++)
    14361438    {
    1437         if (data[j].length<2)
     1439        if (data[j].length<5)
    14381440            continue;
     1441
     1442        ctx.strokeStyle = "#"+data[j].substr(0, 3);
     1443        data[j] = data[j].substr(3);
    14391444
    14401445        ctx.beginPath();
     
    14461451        ctx.lineTo(cw-mr, ch-mb);
    14471452        ctx.lineTo(ml,    ch-mb);
    1448         ctx.fillStyle = "#"+color(100);
    14491453        ctx.stroke();
    14501454
Note: See TracChangeset for help on using the changeset viewer.