Results 1 to 1 of 1

Applying gradient to data points in 3d charts

Threaded View

  1. #1
    Registered User
    Join Date
    02-28-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    14

    Applying gradient to data points in 3d charts

    Hi,
    I want to apply different gradients to the data points in a 3D pie charts. Can someone help??

    The code i have so far :
    With ActiveSheet.Shapes.AddChart
            .Select
            .Top = Range("AE14").Top
            .Left = Range("AE14").Left
            .Height = Range("AE14:AE21").Height
            .Width = Range("AE14:AP14").Width
        End With
        With ActiveChart
            .ChartType = xl3DPie
            .SetSourceData Source:=Range("F18,J18,N18,R18,F19,J19,N19,R19")
            .SeriesCollection(1).ApplyDataLabels
        End With
       'TopHeight
        ActiveChart.SeriesCollection(1).Format.ThreeD.BevelTopDepth = 40
        'Top Width
        ActiveChart.SeriesCollection(1).Format.ThreeD.BevelTopInset = 65
        'Bottom Height
         ActiveChart.SeriesCollection(1).Format.ThreeD.BevelBottomDepth = 12
        'Bottom Width
         ActiveChart.SeriesCollection(1).Format.ThreeD.BevelBottomInset = 120
         ActiveChart.Elevation = 40
          'ActiveChart.Perspective = 30
    and the gradient that i want to apply is :

    With ActiveChart.SeriesCollection(1).Points(1).Interior
            .Pattern = xlPatternLinearGradient
            .Gradient.Degree = 90
            .Gradient.ColorStops.Clear
            With .Gradient.ColorStops.Add(0)
                .Color = 192
                .TintAndShade = 0
            End With
            With .Gradient.ColorStops.Add(0.5)
                .Color = 255
                .TintAndShade = 0
            End With
            With .Gradient.ColorStops.Add(1)
                .Color = 192
                .TintAndShade = 0
            End With
          End With
    please the attached image that is what i want to achieve..

    pie.png
    Last edited by AnkitGuru; 02-12-2013 at 04:44 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1