CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Thread: Gradient Chart

  1. #1
    Join Date
    Nov 2008
    Location
    OK, US
    Posts
    63

    Gradient Chart

    Hi,

    I want to create a chart that has gradient color representing the actual values. For example, I have values for every point within a circle:
    r = 2, angle = 10 degrees : x = 100
    r = 2, angle = 30 degrees : x = 150
    r = 3, angle = 50 degrees : x = 180
    ......
    I want to display this in something similar to a pie chart but with gradient coloring.

    I'm looking to do this in MFC. Is there any available codes that I can look at? Either single point color gradient or gradient blending is good (the latter is preferred of course).

    TIA.

  2. #2
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: Gradient Chart

    I know GTK+ has a color picker widget, so I suspect MFC and most of the others do as well.

  3. #3
    Join Date
    Feb 2002
    Posts
    4,640

    Re: Gradient Chart

    Looks like the GDI+ has support for this:

    http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx

    Viggy

  4. #4
    Join Date
    Nov 2008
    Location
    OK, US
    Posts
    63

    Re: Gradient Chart

    Thanks. I will look into those.
    Is there any special requirement for GDI+? (like .NET framework, etc.) because I try not to rely on those.

  5. #5
    Join Date
    Feb 2005
    Posts
    2,160

    Re: Gradient Chart

    GDI+ is included in WinXP and later IIRC. Win2K has a free update from MS for GDI+, but no .NET dependencies are required.

  6. #6
    Join Date
    Oct 1999
    Location
    ks
    Posts
    523

    Re: Gradient Chart

    what control are you using for charting?

  7. #7
    Join Date
    Nov 2008
    Location
    OK, US
    Posts
    63

    Re: Gradient Chart

    I have not decided yet. I am still looking for a good one. Do you have any suggestion?

  8. #8
    Join Date
    Mar 2003
    Location
    India {Mumbai};
    Posts
    3,871

    Re: Gradient Chart

    My latest article: Explicating the new C++ standard (C++0x)

    Do rate the posts you find useful.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured