Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#12694 closed defect (fixed)

[regression] Dojox Charting: Gradient not working as expected in Dojo 1.6

Reported by: jeetesh_cn Owned by: cjolif
Priority: high Milestone: 1.8
Component: Charting Version: 1.6.0
Keywords: Cc: cjolif
Blocked By: Blocking:

Description

Please refer http://jsfiddle.net/qcQyT/. For Dojo 1.5 the gradients on the chart and the plot area are aligned.

However on Dojo 1.6, the gradients on axis are not aligned with the plotarea gradient. Also I get "Unexpected value NaN parsing x1 attribute." on console.

Change History (6)

comment:1 Changed 9 years ago by Eugene Lazutkin

Component: GeneralCharting
Owner: set to Eugene Lazutkin
Status: newassigned

Confirmed on FF4. It looks like a logical problem rather than a browser/renderer bug.

comment:2 Changed 9 years ago by bill

Summary: Dojox Charting: Gradient not working as expected in Dojo 1.6[regression] Dojox Charting: Gradient not working as expected in Dojo 1.6

comment:3 Changed 8 years ago by cjolif

Cc: cjolif added

This regression was introduced by [23857]

comment:4 Changed 8 years ago by cjolif

Owner: changed from Eugene Lazutkin to cjolif

Starting with 1.8 thanks to clipping you can fix that by removing any plot background and use only chart background to get the desired effect:

        dojo.require("dojox.charting.Chart2D");
        dojo.require("dojox.charting.themes.ThreeD");

        makeObjects = function(){
            dojo.query("button").style("disabled", true);

            var customTheme = dojox.charting.themes.ThreeD.clone();
            customTheme.plotarea.fill = null;
         
            customTheme.chart.fill = dojox.charting.Theme.generateGradient({
                                            type: "linear", space: "shape",
                                            x1: 0, y1: 0, x2: 0, y2: 100},
                                            "red", "blue");

            var chart1 = new dojox.charting.Chart2D("test1").
                    setTheme(customTheme).
                    addAxis("x", {fixLower: "major", fixUpper: "major", natural: true, includeZero: true}).
                    addAxis("y", {vertical: true, fixLower: "major", fixUpper: "major", natural: true, includeZero: true}).
                    addPlot("default", {type: "Markers"}).
                    addSeries("Series A", [{x: 1, y: 1}, {x: 2, y: 2}, {x: 3, y: 1}]).
                    addSeries("Series B", [{x: 3, y: 2}, {x: 4, y: 3}, {x: 5, y: 2}]).
                    addSeries("Series C", [{x: 5, y: 3}, {x: 6, y: 4}, {x: 7, y: 3}]).
                    render();

        };
        dojo.ready(makeObjects);

comment:5 Changed 8 years ago by cjolif

Resolution: fixed
Status: assignedclosed

In [28572]:

fixes #12694.

comment:6 Changed 8 years ago by bill

Milestone: tbd1.8
Note: See TracTickets for help on using tickets.