When using Graph and Chart , you have the option to use any type of material and shader. However Graph and Chart comes with a few shaders that you can apply to your materials. Here is an overview of how to use shaders and materials with Graph and Chart
Using Materials with a Chart
You can apply your own materials to any chart in any way that you see fit. The only limitation is that materials applies to canvas charts should be compatible with Unity UI . Any of the shaders in the UI folder would match this requirement:
When using a world space chart you can use any materials that you wish.
Canvas Materials That are Part of Graph and Chart
canvas materials should be used only with canvas charts. Graph and chart contains a solid canvas material and a gradient canvas material. you can find them in the shader menu in the material inspector:
World Space Materials That are part of Graph and Chart
World Space materials should be used only with world space charts. The world space materials are based on unity’s toon shader. you can find these materials in the shader menu :
Properties of Graph and Chart’s shaders
When you apply one of these shaders to a material , you can change their settings just like you would with any unity material:
- Texture can be set like any unity material
- Gradient material:
- Angle will set the angle of the gradient , you can have a diagonal gradient by setting the angle to 45 for example
- From/To are the start and end colors of the gradient
- Combine is used internally and should be ignored
- Solid material:
- Color is the diffuse color for the material