Color schemes with charts

Hi,

We have a system that changes slides between multiple masters each with different color schemes. The system works changing between the various masters and colors, but I’m finding that the charts aren’t updating to the color of the master.

Probably best to illustrate what I mean. I’ve attached a presentation with a single slide and 2 masters each with a different color scheme. The following code changes the presentation from the first master to the second. If you run the code you will see that the slide correctly changes master, however the chart doesn’t change colour. If you double click the chart you will see it pop into the correct color scheme.

Dim pres As New Presentation(“C:\Temp\Boilers_280112_V13 - Copy.ppt”)
Dim master As MainMaster = pres.Masters(1)

Dim lastSlidePosition As Integer = pres.Slides.LastSlidePosition
For i As Integer = 1 To lastSlidePosition
Dim slide As Slide = pres.GetSlideByPosition(i)
slide.ChangeMaster(master, True)
Next i

pres.DeleteUnusedMasters()

pres.Save(“c:\temp\AsposeOutPut4.ppt”, Aspose.Slides.Export.SaveFormat.Ppt)


I wondered if you could take and work out why the charts aren’t updating.

Thanks in advance
Dan

Hi Dan,


I have observed the issue shared by you and like to share that it is in fact not an issue with Aspose.Slides if you are trying to change the master and expecting that charts color should also be changed. If you even change the master from PowerPoint, the chart colors also remains the same. The chart is added as ole frame and it will not change the color in PowerPoint unless it is edited in PowerPoint by double clicking it. Hope, it will clear the concept to you.

Many Thanks,

Hi,

If I open the file in PowerPoint, right click the slide and go to Slide Design, then click the master I want from the panel on the right, the color scheme does change. Is this not the correct way of changing the master?

Thanks
Dan

Hi,

Did you have any thoughts on this post?

Thanks
Dan

Hi Dan,


I am sorry for missing the earlier post. The thing that you have pointed out is actually changing color scheme. The color schemes changing in master slides are unfortunately not supported at the moment. An issue with ID SLIDESNET-29608 has been added to provide this feature and has been resolved as well. The fix will be supported in Aspose.Slides for .NET 6.0.0 which is due for release in March 20, 2012. Hopefully, things will be settled with the fix and even if It does not get resolve by then, I will add a new feature request in our issue tracking system.

Many Thanks,

Hi,

Thanks for the reply. Would you be able to check whether this problem will be fixed in 6.0.0? It’s the final problem holding up our product/website, so it’s quite critical for us.

Are there any alternatives? How do you change colour schemes in 2003 and will it affect the OLE charts? How do you change the colours of OLE charts generally? or are you saying this isn’t supported.

Thanks
Dan

The issues you have found earlier (filed as SLIDESNET-29608) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hi,

As far as I can see, this issue isn’t fixed in the latest version. Using the file and code I attached previously the colours in the OLE chart still does not change.

Thanks
Dan

Hi Dan,


I have worked with the source presentation shared and applied the custom color scheme on that using Aspose.Slides for .NET 6.0.0. The text is getting effect of the applied color scheme but chart is not. I have re-opened the issue SLIDESNET-29608 for further investigation by our development team to resolve the issue.

However, there is one interesting thing that I have observed in generated presentation to apply the modified color scheme impact on chart as well. I performed following steps and it worked. You may use the same approach for the time being.

  1. Open generated presentation in slide master view
  2. Choose and apply any arbitrary color scheme and close Master view
  3. You will see the newly adopted color scheme applied on chart
  4. Now press Ctrl+Z to revert back to old master color scheme in slide master view
  5. Close slide master, you will see the Aspose.Slides adopted color schemes on chart as well

We are sorry for your inconvenience,

Hi,

Thanks for the suggestion. Unfortunately the system generates presentations for the end users/clients, so we can’t asked them to go through these steps, it will look unprofessional.

I appreciate you looking into this problem. It’s currently holding up the final release of our product, so I would really appreciate you making this a priority.

Many thanks
Dan

Hi Dan,


I have requested our development team to investigate whether we are able to resolve the issue in coming release. I will share the further response with you as soon as the response will be received from our development team.

Many Thanks,

Hi,

I’ve spent the day looking into this to try and find a work around until an update can be provided. Unfortunately I don’t have a solution.

I’m getting pressure from above to resolve this as it’s holding up the release of our website. So I’d really appreciate if you can make this a priority and email me as soon as you have any update.

Thanks in advance,
Dan

Hi,

What does ExtraColorScheme do? I can’t find any documentation for this and when I examine this structure at runtime it shows no data.

Generally in 2003 how do you change between colour schemes?

Thanks
Dan

Hi Dan,


I have verified from our issue tracking system and like to share that the issue has been schedule for investigation during Week 11 of 2012. I will be able to share the further response related to ETA after the investigation is carried. Actually, this feature has just been introduced in this new release and will take some time based on customer feedback to get mature. We are trying our best to facilitate our worthy customer every possible way. Regarding, issue of ExtraColorScheme, I am awaiting elaboration fro concerned developer and will share the updates with you accordingly.

Many Thanks,

Hi Dan,


I have discussed the purpose of ExtraColorScheme in new API. Actually, extra color schemes are embedded predefined sets of colors, which can be copied to the main color scheme of the slide. Extra color schemes don’t affect rendering process, they are only used to store data, so editing an extra color scheme will not change presentation’s look.

The method MainMaster.ApplyColorScheme() doesn’t add new color scheme, it just copies all content of existing extra color scheme to main color scheme of slide.

Hope it clear the concept now.

Many Thanks,

Hi,

Thanks for the extra information.

So can I use ExtraColorScheme and ApplyColorScheme to solve the problem above? I tried to use these a few days ago to force the chart to the color scheme of the master. However when I tried adding this code to the code above:

Dim master As MainMaster = pres.Masters(1)

Dim extracolourscheme As ExtraColorScheme = master.ExtraColorSchemes(0)

slide.ApplyColorScheme(extracolourscheme)

It had no effect. In fact when I debugged and watched extracolourschemeI found it to be empty. When I added a second color scheme, using ExtraColorScheme didn’t seem to let me change between schemes. I’m not sure that this will be a solution to the overall problem, however for reference could you let me know the proper use of this function.

I appreciate you guys looking into this problem.

Thanks
Dan

Hi Dan,


As I have shared in my previous post that ExtrColorScheme object only holds the color that you will define in it. It will not set that color unless ApllyColorSceme() method is called that copies the color in ExtraColorScheme to currently applied color scheme. I have used the following code snippet and it worked fine on my end. Please share if I may help you further with this.


String path = @“C:\Users\Mudassir\Downloads”;
Presentation pres = new Presentation(path + “Boilers_280112_V13±+Copy2.ppt”);
Slide sli = pres.GetSlideByPosition(1);
pres.MainMaster.ExtraColorSchemes[0].SetSchemeColor( ColorSchemeIndex.Accent1, Color.Aqua);
pres.MainMaster.ExtraColorSchemes[0].SetSchemeColor(ColorSchemeIndex.Accent1, Color.Azure);
pres.MainMaster.ExtraColorSchemes[0].SetSchemeColor(ColorSchemeIndex.Accent3, Color.Bisque);
pres.MainMaster.ExtraColorSchemes[0].SetSchemeColor(ColorSchemeIndex.Background1 , Color.BlueViolet);
pres.MainMaster.ExtraColorSchemes[0].SetSchemeColor(ColorSchemeIndex.Background2, Color.Brown);
pres.MainMaster.ExtraColorSchemes[0].SetSchemeColor(ColorSchemeIndex.Fill , Color.DarkBlue);
pres.MainMaster.ExtraColorSchemes[0].SetSchemeColor(ColorSchemeIndex.Text1 , Color.DarkTurquoise);
pres.MainMaster.ExtraColorSchemes[0].SetSchemeColor(ColorSchemeIndex.Text2 , Color.ForestGreen);
pres.MainMaster.ApplyColorScheme (pres.MainMaster.ExtraColorSchemes [0]);
pres.Write(path + “Abc.ppt”);


Many Thanks,

Hi,

Thanks for that code. It works to change the colorscheme. As an aside - for some reason the pres.MainMaster.ExtraColorSchemes[0] object is not available to examine in visual studio watch.

More generally this doesn’t solve the problem of the charts not changing to fit the scheme, which you mention the developers are going to look into Week 11. I look forward to hearing back from you on this.

Many thanks
Dan

Hi Dan,


Surely, I will share the information with you as soon as the information will be available.

Many Thanks,

Any news on this problem? Thanks