Changes between Version 2 and Version 5 of Ticket #8868


Ignore:
Timestamp:
Apr 3, 2010, 11:39:50 PM (11 years ago)
Author:
Eugene Lazutkin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #8868

    • Property Milestone changed from future to 1.5
  • Ticket #8868 – Description

    v2 v5  
    33(I use this technique of updateSeries(name, []) to simulate hiding a  series on a line graph and then use updateSeries(name, [data]) to show the series again.  To work around this problem, I have to leave a single data point in the "empty" data array in order to have the colors not switch when I hide/show the series.)
    44
    5 The following small sample illustrates this bug.
    6 
    7 {{{
    8 <head>
    9         <style type="text/css">
    10                 @import "../../../dojo/resources/dojo.css";
    11                 @import "../../../dijit/tests/css/dijitTests.css";
    12         </style>
    13         <script type="text/javascript" src="../../../dojo/dojo.js" djConfig="isDebug: true"></script>
    14         <script type="text/javascript">
    15 
    16                 dojo.require("dojox.charting.Chart2D");
    17                 dojo.require("dojox.charting.themes.Shrooms");
    18 
    19          var makeObjects = function() {
    20                var c = new dojox.charting.Chart2D("test");
    21                c.addPlot("default", {type: "Lines"});
    22                c.addAxis("x", {fixUpper: "major", fixLower:"minor"});
    23                c.addAxis("y", {vertical: true, fixUpper: "major", includeZero: true});
    24                c.setTheme(dojox.charting.themes.Shrooms);
    25                c.addSeries("Series A", [1, 2, 0.5, 1.5, 1, 2.8, 0.4]);
    26                c.addSeries("Series B", [2.6, 1.8, 2, 1, 1.4, 0.7, 2]);
    27                cData = [2, 2.2, 2, 2.2, 2, 2.2, 2];
    28                c.addSeries("Series C", []);
    29                c.render();
    30                alert("Series A and B have data...C is empty");
    31                c.updateSeries("Series C", cData);
    32                alert("Series C has now been updated with data.  Refresh when you click OK");
    33                c.render();
    34                alert("Notice that C now got B's color, B got A's color, and A got a new color.  The theme rotates colors.");
    35         };
    36 
    37         dojo.addOnLoad(makeObjects);
    38       </script>
    39 </head>
    40 <body>
    41 <div id="test" style="width: 400px; height: 400px;"></div>
    42 
    43 </body>
    44 }}}
     5The attached small sample illustrates this bug.