Ability to customize tilted pie shadow #78

Merged
merged 2 commits into from Sep 26, 2012

Conversation

Projects
None yet
2 participants
@julthomas

Hi,

This patch provides ability to customize top/left offset and alpha level of tilted Pie shadow. I have updated the documentation (pie example). Following is how to use it :

$.plot(
    $('#overall-state-summary div.pie-state'),
    state, 
    {    series: {
            pie: {
                show: true,
                startAngle: 4/9,
                radius: 3/4,
                innerRadius: 0.27,
                tilt: 0.5,
                shadow: {
                    left: 1,
                    top: 12,
                    alpha: 0.1,
                },
                offset: {
                    top: -5
                },
                stroke: {
                    color: '#585858',
                    width: 1
                },
                label: {
                    show: false,
                }
            }
        },
        legend: {
            show: false, 
        }
    }
);

Regards,
Julien

@dnschnur

This comment has been minimized.

Show comment Hide comment
@dnschnur

dnschnur Sep 26, 2012

Member

I like this patch a lot; the commits are just the right size, clearly organized, and nicely labeled, making my job much easier.

I also like the way you've added the 'shadow' option; this is exactly how I'd see it being used more broadly. In case you're interested in expanding on this, or implementing it for other plot types, my main suggestion would be to add a 'size' option. This would map nicely to the existing 'shadowSize' options for some of the other plot types. Another option might be 'color', to override the default #000.

Thanks for submitting this!

Member

dnschnur commented Sep 26, 2012

I like this patch a lot; the commits are just the right size, clearly organized, and nicely labeled, making my job much easier.

I also like the way you've added the 'shadow' option; this is exactly how I'd see it being used more broadly. In case you're interested in expanding on this, or implementing it for other plot types, my main suggestion would be to add a 'size' option. This would map nicely to the existing 'shadowSize' options for some of the other plot types. Another option might be 'color', to override the default #000.

Thanks for submitting this!

dnschnur added a commit that referenced this pull request Sep 26, 2012

Merge pull request #78 from julthomas/pie-shadow
Added options to customize tilted pie shadows.

@dnschnur dnschnur merged commit 53d6112 into flot:master Sep 26, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment