mishra1982 Posted April 16, 2013 Report Share Posted April 16, 2013 Hi All, I would like to draw a chart where i can input custom x and y axis datas. I want to put Y axis as : 0, 70,179, 200, 300 .... Please help me on JChartFX. Quote Link to comment Share on other sites More sharing options...
0 JuanC Posted April 16, 2013 Report Share Posted April 16, 2013 To change the Y axis labels you have two options 1) Handle an event to change the axis label var axisY = chart1.getAxisY(); axisY.setNotify(true); chart1.on("getaxislabel", onAxisLabel); function onAxisLabel(args) { args.setText("$" + args.getText()); } 2) If the Y axis labels are "finite" you can set the labels and step as follows var items = [{"Month":"Jan", "Value":1},{"Month":"Feb", "Value":2},{"Month":"Mar", "Value":3},{"Month":"Apr", "Value":2}]; chart1.setDataSource(items); var axisy = chart1.getAxisY(); axisy.setStep(1); axisy.setLabelValue(1); var labels = axisy.getLabels(); labels.setItem(0, "Bad"); labels.setItem(1, "Low"); labels.setItem(2, "Med"); labels.setItem(3, "Avg"); JuanC Quote Link to comment Share on other sites More sharing options...
Question
mishra1982
Hi All,
I would like to draw a chart where i can input custom x and y axis datas.
I want to put Y axis as : 0, 70,179, 200, 300 ....
Please help me on JChartFX.
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.