Hi,
I would like to show captions that appears along X and Y- axis in a webchart. How do I do that ?
I am adding my axis dynamically to chart as under:
//Add yAxis settings Axis yAxis = new Axis(); yAxis.setAutoRange(true); yAxis.setAutoRangeSnap(true); yAxis.setAutoTickMarks(true); chart1.getChildren().add(yAxis); yAxis.setParent(chart1);
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4
Hello ,
Here is the code snippet about setting a caption to the axis .
// Create x Axis
Axis xAxis = new Axis();
xAxis.setType(AxisType.X.toString());
xAxis.setAutoRange(true);
xAxis.setAutoGridLines(true);
xAxis.setAutoTickMarks(false);
// Create x Axis caption
TickMark markX = new TickMark();
markX.setValue(0);
markX.setTickCaption("X Caption");
xAxis.getChildren().add(markX);
chart.getChildren().add(xAxis);
// Create y Axis
Axis yAxis = new Axis();
yAxis.setType(AxisType.Y.toString());
// Create Y Axis caption
TickMark markY = new TickMark();
markY.setValue(0);
markY.setTickCaption("Y Caption");
yAxis.getChildren().add(markY);
chart.getChildren().add(yAxis);
Hope this helps.
Sincerely,
Tsvetelina
I am looking for a caption, not a tickmark along the axis !!
I have attached a sample bar chart that shows captions as under:
Here the captions are "Month" for X-Axis and "Number of Students" for Y Axis.
How can I do this with Infragistics webchart. ?
Abhishek