Changeset 20698 in dojo


Ignore:
Timestamp:
10/29/09 16:44:04 (3 years ago)
Author:
peller
Message:

allow the line stroke style to be customized

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dojox/trunk/widget/DataPresentation.js

    r20697 r20698  
    250250                                } 
    251251                                         
    252                             _chart.addSeries(store.series_name[i], xvals, { plot: axistype + "-" + charttype }); 
     252                                var seriesargs = { plot: axistype + "-" + charttype }; 
     253                                if(store.series_linestyle[i]){ 
     254                                        seriesargs.stroke = { style: store.series_linestyle[i] }; 
     255                                } 
     256                            _chart.addSeries(store.series_name[i], xvals, seriesargs); 
    253257                        } 
    254258                } 
     
    419423                //          charttype: the type of presentation of the series in the chart, which can be 
    420424                //                              "range", "line", "bar" (default: "bar") 
     425                //          linestyle: the stroke style for lines (if applicable) (default: "Solid") 
    421426                //          axis: the dependant axis to which the series will be attached in the chart, 
    422427                //              which can be "primary" or "secondary" 
     
    604609                        var _series = (typeof this.series == 'function') ? this.series(this.data) : this.series; 
    605610 
    606                         var datasets = []; 
    607                         var series_data = []; 
    608                         var series_name = []; 
    609                         var series_chart = []; 
    610                         var series_charttype = []; 
    611                         var series_axis = []; 
    612                         var series_grid = []; 
    613                         var series_gridformatter = []; 
    614                         var maxlen = 0; 
     611                        var datasets = [], 
     612                                series_data = [], 
     613                                series_name = [], 
     614                                series_chart = [], 
     615                                series_charttype = [], 
     616                                series_linestyle = [], 
     617                                series_axis = [], 
     618                                series_grid = [], 
     619                                series_gridformatter = [], 
     620                                maxlen = 0; 
    615621                         
    616622                        // identify the dataset arrays in which series values can be found 
     
    626632                                series_chart[ser] = (_series[ser].chart !== false); 
    627633                                series_charttype[ser] = _series[ser].charttype || "bar"; 
     634                                series_linestyle[ser] = _series[ser].linestyle; 
    628635                                series_axis[ser] = _series[ser].axis || "primary"; 
    629636                                series_grid[ser] = (_series[ser].grid !== false); 
     
    678685                        store.series_chart = series_chart;  
    679686                        store.series_charttype = series_charttype;  
     687                        store.series_linestyle = series_linestyle;  
    680688                        store.series_axis = series_axis;  
    681689                        store.series_grid = series_grid;  
Note: See TracChangeset for help on using the changeset viewer.