javascript - chart.JS i want to put different color for each Y axis value grid line color -


i using mvc 4.0 , chart.js generate graph. want put horizontal line of y axis each value , success develop using below property.

scaleshowgridlines = true; scaleshowhorizontallines: true, //boolean - whether show vertical lines (except y axis) scaleshowverticallines: false, 

but actual requirement want put different color of horizontal line.

scalegridlinecolor: "rgba(0,0,0,.05)" 

above line change color of horizontal line apply line.

please guide me.

you can set individual colors horizontal , vertical gridlines adding scales configuration options:

scales: {     yaxes: [{         gridlines: {             color: 'green'         }     }],     xaxes: [{         gridlines: {             color: 'red'         }       }] } 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -