| | | | Browse by category |
Question
How to set the position of a new scale in the chart?
Answer
The position of a scale can be set by means of the following methods:
-
ilog.views.chart.IlvScale.setCrossingValue(double)
, for a fixed value on the dual axis (the "dual axis" description can be found in theIlvScale.getDualAxis()
documentation). -
ilog.views.chart.IlvScale.setCrossing(IlvAxis.Crossing)
, to compute thecrossing point by a function receiving the dual
ilog.views.chart.IlvAxis
as parameter. The default implementations areIlvAxis.MIN_VALUE
andIlvAxis.MAX_VALUE
.
When two scales share the same crossing (IlvAxis.MIN_VALUE
or IlvAxis.MAX_VALUE
), the chart automatically arranges the scales to avoid overlapping.
For example: in a Cartesian chart, setting several scales at theIlvAxis.MIN_VALUE
crossing will have the scales drawn one after another at the left side of the chart.