MVC5 Classic
Style the Axis Labels

To modify the X-Axis and Y-axis label color and font size use the following code:

axis: {
                y: {
                    labels: {
                        style: {
                            fill: "#0000cc",
                            "font-size": "11pt"
                        }
                    },
                    gridMajor: {
                        style: { stroke: "#353539", "stroke-dasharray": "- " }
                    },
                    tickMajor: { position: "outside", style: { stroke: "#7f7f7f"} },
                    tickMinor: { position: "outside", style: { stroke: "#7f7f7f"} }
                },
                x: {
                    labels: {
                        style: {
                            fill: "#0000cc",
                            "font-size": "11pt",
                            rotation: -45
                        }
                    },
                    tickMajor: { position: "outside", style: { stroke: "#7f7f7f"} }
                }
            },

This topic illustrates the following:

The following image shows the Y-Axis label’s font size and forecolor modified. The font size was modified using the “font-size” option and the forecolor was modified using the fill option.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum |  Documentation Feedback