OWC11 AxChartSpace - Colors

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chrisli
    New Member
    • Nov 2008
    • 11

    OWC11 AxChartSpace - Colors

    Hi,
    i'm using the OWC11 AxChartSpace Component for a little statistic.
    Everything works great, but i'm not very happy with the used colors in the ChartPie, so i want to change them.

    So it looks like at the moment: http://img249.yfrog.com/i/chartcolors.jpg

    For example i want to change the color of the "unbestätig t" Value, to green..but i have absolutely no idea how to do this. I only found a method which changes the backcolor...

    Thank you for your help.

    Greetings.
  • PRR
    Recognized Expert Contributor
    • Dec 2007
    • 750

    #2
    I haven't touched office components for a long time... though i remember you can set colors of bar charts... i.e. add specific colors to the bars/pies etc...
    Link
    Code:
    AxChartSpace1.Charts(0).SeriesCollection(0).Interior.Color="green";

    Comment

    • chrisli
      New Member
      • Nov 2008
      • 11

      #3
      Hi,
      thanks for your answer.

      You are right, with your posted code, i can change the Chart Categories colors, but only in ONE Color. Picture: http://www.pictureupload.de/pictures...artcolors2.JPG

      Any additional ideas?

      Greetings from Germany.

      Comment

      • chrisli
        New Member
        • Nov 2008
        • 11

        #4
        Finally, i got it. What a mess. ;)

        Here's the code:

        Code:
        myChart.Charts(0).SeriesCollection(0).Points(1).Interior.Color = "red"
        myChart.Charts(0).SeriesCollection(0).Points(0).Interior.Color = "green"
        myChart.Charts(0).SeriesCollection(0).Points(2).Interior.Color = "yellow"
        This took me so much time, just for finding out, that the added Categories are named ".Points"..

        Comment

        • PRR
          Recognized Expert Contributor
          • Dec 2007
          • 750

          #5
          Welcome chrisli! Do continue to post on Bytes :)

          Comment

          • chrisli
            New Member
            • Nov 2008
            • 11

            #6
            I'll try to. But beware, i'm still a beginner. ;)

            Comment

            • PRR
              Recognized Expert Contributor
              • Dec 2007
              • 750

              #7
              I too consider myself beginner... there is lots to learn... you should consider posting answers.... you can certainly learn a lot that way ....

              Comment

              Working...