com.nchart3d.NChart.NChartScatterSeries Class Reference

The NChartScatterSeries class provides methods to display scatter series. More...

Inheritance diagram for com.nchart3d.NChart.NChartScatterSeries:
com.nchart3d.NChart.NChartSeries com.nchart3d.NChart.NChartObject

Public Member Functions

void updateScatterForPoint (long pointIndex, long startElementIndex, long elementsCount, ByteBuffer patch)
 Do a partial and efficient update of the scatter data. More...
 
void updateScatterAnimatedForPoint (long pointIndex, long startElementIndex, long elementsCount, ByteBuffer patch, float duration, float delay)
 Do an animated partial update. More...
 
- Public Member Functions inherited from com.nchart3d.NChart.NChartSeries
NChartPoint[] getPoints ()
 Array of points.
 
Bitmap getImage ()
 Image that is displayed in the legend. More...
 
Bitmap getDisabledImage ()
 Image that is displayed in the legend when the series is hidden (aka disabled). More...
 
String getName ()
 Name of the series.
 
int getNameColor ()
 Get color of the series name displayed in the legend. More...
 
void setNameColor (int color)
 For details see getNameColor().
 
int getDisabledNameColor ()
 Get color of the series name displayed in the legend when the series is hidden (aka disabled). More...
 
void setDisabledNameColor (int color)
 For details see getDisabledNameColor().
 
float getLegendMarkerSize ()
 Size of default series' marker in legend in pixels. More...
 
void setLegendMarkerSize (float legendMarkerSize)
 For details see getLegendMarkerSize().
 
NChartBrushScale getScale ()
 Brush scale of the series used to color the map.
 
void setScale (NChartBrushScale scale)
 For details see getScale().
 
int getTag ()
 Tag of the series. More...
 
void setTag (int tag)
 For details see getTag().
 
boolean isVisible ()
 Flag that determines if the series is visible or not. More...
 
void setVisible (boolean visible)
 For details see isVisible().
 
boolean getHostsOnSX ()
 Flag that determines if the series is hosted on the secondary X-axis. More...
 
void setHostsOnSX (boolean hostsOnSX)
 For details see getHostsOnSX().
 
boolean getHostsOnSY ()
 Flag that determines if the series is hosted on the secondary Y-axis. More...
 
void setHostsOnSY (boolean hostsOnSY)
 For details see getHostsOnSY().
 
boolean getHostsOnSZ ()
 Flag that determines if the series is hosted on the secondary Z-axis. More...
 
void setHostsOnSZ (boolean hostsOnSZ)
 For details see getHostsOnSZ().
 
NChartSeriesDataSource getDataSource ()
 Data source for the series. More...
 
void setDataSource (NChartSeriesDataSource dataSource)
 For details see getDataSource().
 
NChartDataSmoother getDataSmoother ()
 Data smoother used. More...
 
void setDataSmoother (NChartDataSmoother dataSmoother)
 For details see getDataSmoother().
 
boolean isForceAbsolute ()
 Flag that determines if the series forces absolute value axis. More...
 
void setForceAbsolute (boolean forceAbsolute)
 For details see isForceAbsolute().
 
boolean isPointSelectionEnabled ()
 Flag determining if the chart points can be selected by tap (true) or not (false). More...
 
void setPointSelectionEnabled (boolean pointSelectionEnabled)
 For details see isPointSelectionEnabled().
 
boolean isNeedsSeparateSums ()
 Flag determining if in the additive value axis mode (when valueAxesType = NChartValueAxesType.Additive) positive and negative values are added separately, so all positives are above zero and all negatives are below zero (true), or all the values are just added together (false). More...
 
void setNeedsSeparateSums (boolean needsSeparateSums)
 For details see isNeedsSeparateSums().
 
boolean isUpdateAllowed ()
 Flag providing a hint that the series has no modifications and should not be updated by the next NChart#rebuildSeries() or NChart#updateSeries() call (false) or it should be updated as normal (true). More...
 
void setUpdateAllowed (boolean updateAllowed)
 For details see isUpdateAllowed().
 
- Public Member Functions inherited from com.nchart3d.NChart.NChartObject
boolean isVisible ()
 Flag that determines if the object is visible or not. More...
 
void setVisible (boolean visible)
 For details see isVisible().
 
NChart getChart ()
 Chart the object belongs to. More...
 

Detailed Description

The NChartScatterSeries class provides methods to display scatter series.

Scatter is visually similar to NChartBubbleSeries, but it is made to display really big amounts of data. While NChartBubbleSeries barely makes to stay interactive with 10k+ data points (and is terribly slow at 50k), NChartScatterSeries can handle 1M and more. The price to pay is reduced feature set. For example, you cannot set tooltips on the points level like you can in NChartBubbleSeries. Still, you can handle data point selection and describe individual points using NChartCrosshair.
Handling point selection is a bit different from regular series. In the corresponding delegate methods, you will receive a point of series with the

index

property set to the scatter array element index (starting from 0).

Member Function Documentation

void com.nchart3d.NChart.NChartScatterSeries.updateScatterAnimatedForPoint ( long  pointIndex,
long  startElementIndex,
long  elementsCount,
ByteBuffer  patch,
float  duration,
float  delay 
)
inline

Do an animated partial update.

The same as updateScatterForPoint(long, long, long, ByteBuffer) but with an animated transition.

This method is much more performance demanding than its non-animated version, so use it with care.

Parameters
pointIndex- index of point to update.
startElementIndex- index of scatter element inside of the point, at which to start the update.
elementsCount- number of elements to update.
patch- direct ByteBuffer containing the patch for the elements. See updateScatterForPoint(long, long, long, ByteBuffer) for details.
duration- duration of the animation in seconds.
delay- delay of animation start after this call in seconds.
void com.nchart3d.NChart.NChartScatterSeries.updateScatterForPoint ( long  pointIndex,
long  startElementIndex,
long  elementsCount,
ByteBuffer  patch 
)
inline

Do a partial and efficient update of the scatter data.

Use this method to organize streamed scatter updates. This method bypasses all the

updateData

,

streamData

, etc. machinery of NChart3D and accesses the plot internals directly (still ensuring the thread safety).

This method cannot reshape the scatter data. It means, your update has to be perfectly inside of the data you already supplied by the

updateData

call. Also, the element type has to be exactly the same as it was in the

updateData

call.

It is meant to be a partial update. Preferably, just for a very small part. But you can also update the entire dataset, which will be still faster than doing a new

updateData

call.

Warning: For the sake of speed, this method does no integrity checks. So, if your given parameter values do not correspond to what you had (for example, the indices do not match), expect crashing or undefined behavior.

Parameters
pointIndex- index of point to update.
startElementIndex- index of scatter element inside of the point, at which to start the update.
elementsCount- number of elements to update.
patch- direct ByteBuffer containing the patch for the elements. It should be organized exactly the same as the values buffer in NChartScatterArray, but covering only the updated range. The buffer may be reused right after this call.