Package org.eclipse.birt.chart.computation.withaxes

# Class SharedScaleContext

java.lang.Object
org.eclipse.birt.chart.computation.withaxes.SharedScaleContext

public final class SharedScaleContext extends Object
We use this class to store shared scale context of chart in cross-tab.

Since:
  2.5

## Constructor Summary

Constructors
Constructor
Description
`SharedScaleContext(ScaleContext scaleContext, Object realMin, Object realMax)`

## Method Summary

Modifier and Type
Method
Description
`DataSetIterator`
`createDataSetIterator(int iDataType)`
Create a DataSetIterator with the min/max value, which can be used by AutoScale.
`DataSetIterator`
`createDataSetIterator(int iDataType, boolean isBigNumber, com.ibm.icu.math.BigDecimal divisor)`
Create a DataSetIterator with the min/max value, which can be used by AutoScale.
`static SharedScaleContext`
`createInstance(Object oMin, Object oMax)`
`ScaleContext`
`getScaleContext()`
`boolean`
`isShared()`
Returns if the scale will be shared among multiple chart instances
`void`
`setScaleContext(ScaleContext scaleContext)`
`void`
`setShared(boolean shared)`
`void`
`updateBounds(Bounds bo)`
update the bounds info, shared scale should be recalculated when bounds changed.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SharedScaleContext

public SharedScaleContext(ScaleContext scaleContext, Object realMin, Object realMax)

## Method Details

### updateBounds

public void updateBounds(Bounds bo)
update the bounds info, shared scale should be recalculated when bounds changed.

Parameters:
  `bo` -

### createInstance

public static SharedScaleContext createInstance(Object oMin, Object oMax)

Parameters:
  `oMin` -
  `oMax` -
Returns:

### getScaleContext

public ScaleContext getScaleContext()

Returns:
  Returns the scaleContext.

### setScaleContext

public void setScaleContext(ScaleContext scaleContext)

Parameters:
  `scaleContext` - The scaleContext to set.

### isShared

public boolean isShared()
Returns if the scale will be shared among multiple chart instances

Returns:
  shared or not
Since:
  2.5

### setShared

public void setShared(boolean shared)

Parameters:
  `shared` -
Since:
  2.5

### createDataSetIterator

public DataSetIterator createDataSetIterator(int iDataType) throws ChartException, IllegalArgumentException
Create a DataSetIterator with the min/max value, which can be used by AutoScale.

Parameters:
  `iDataType` -
Returns:
Throws:
  `ChartException`
  `IllegalArgumentException`

### createDataSetIterator

public DataSetIterator createDataSetIterator(int iDataType, boolean isBigNumber, com.ibm.icu.math.BigDecimal divisor) throws ChartException, IllegalArgumentException
Create a DataSetIterator with the min/max value, which can be used by AutoScale. This method supports big decimal.

Parameters:
  `iDataType` -
  `isBigNumber` - indicates current is big number.
  `divisor` - the divisor for big number, actual big number will divide the divisor to get a double value, the double value is used to compute scale of axis.
Returns:
Throws:
  `ChartException`
  `IllegalArgumentException`
Since:
  2.6