Click here to Skip to main content
15,071,262 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
here the below line output is percentage.How to get the year in tickformat

What I have tried:

d3 format year javascript code
Updated 7-Jul-16 21:08pm

1 solution

try this

chart.yAxis.tickFormat(function (d) { return d3.time.format("%Y")(d) });

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900