OxyColors Gradient

Oystein Bjorke 6 years ago updated by Lijo 3 years ago 1
This discussion was imported from CodePlex

A7eex wrote at 2013-08-14 10:23:

Hey there,

i'm currently trying to improve the Graphics of my Chart and therefore i wanted to change the PlotAreaBackground to a gradient Color so that it switches from i.e. white to light grey.
This feature is not supported yet, is it? Is there a way to achive this?

Regards Alex

objo wrote at 2013-08-14 10:42:

Sorry, gradients are not supported. I want to keep the rendering API as simple as possible, to make it easy to port to different platforms.

I recommend reading the books of Tufte and Few (links on home page), they have many recommendations about how a chart should be styled. Background gradients is one of the embellishments they don't recommend!

everytimer wrote at 2013-08-14 11:11:

If you really NEED the gradient I think you could set the background to Transparent and add a Rectangle of the same size as the Plot behind with the gradient. I don't consider this a good solution or even a solution, maybe just a patch. Good luck

A7eex wrote at 2013-08-14 11:23:

Thanks for the quick and helpful answers. I think i will just stick with the standard design.

objo wrote at 2013-08-14 21:25:

I thought about it on my way home from work... There is a workaround. Use an ImageAnnotation with an image containing the gradient and stretch it over the plot area.
See the example I just added! (Sorry, I didn't try to make it look pretty :)

A7eex wrote at 2013-08-16 09:56:

Haha! It's great! Good choice of colors! :) No I won't mess up my charts like this but thank you!

@objo Where can I see the example, you mentioned above about ImageAnnotation ?