Chart FX 7 for Java Desktop

com.softwarefx.chartfx.desktop.galleries
Class Curve

java.lang.Object
  extended by com.softwarefx.chartfx.desktop.galleries.Curve
All Implemented Interfaces:
IGallery, Serializable

public class Curve
extends Object
implements IGallery, Serializable

Provides access to the Curve gallery object.

The properties of the Curve Class allow you to customize the visual attributes of a Curve or CurveArea chart. In order to make the supported members available, you must first set the gallery of the chart to Curve or CurveArea, and cast the Chart.setGalleryAttributes(com.softwarefx.chartfx.desktop.IGallery) property of the Chart to the Curve Class :

Curve curve = (Curve) chart1.getGalleryAttributes();

The cast will fail if the gallery is not set to Curve or CurveArea.

Once you have done this, using the newly created object you can assign these special attributes for the Curve or CurveArea gallery type in your chart.

See Also:
Serialized Form

Constructor Summary
Curve()
           
 
Method Summary
 float getTension()
          Gets the Tension.
 boolean isNative()
          Gets the Native.
 void setNative(boolean value)
          When sets to false, Chart FX for Java internal algorithm will be used to draw curves.
 void setTension(float value)
          Sets the Tension variable for the Cubic Spline curve algorithm.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Curve

public Curve()
Method Detail

getTension

public float getTension()

Gets the Tension. For more detail see setTension(float).


isNative

public boolean isNative()

Gets the Native. For more detail see setNative(boolean).


setNative

public void setNative(boolean value)

When sets to false, Chart FX for Java internal algorithm will be used to draw curves. Otherwise, the Java API native algorithm will be used.

Remarks:
  • Set it to True to use the Java API native algorithm. Set it to False to use Chart FX for Java internal algorithm.

  • In some cases, the Chart FX for Java internal algorithm will offer a better performace.

  • Below, the chart uses the internal algorithm to draw the curve:

    Alternativelly, this is the chart using the native algorithm provided with the Java API :

  • See Also:
    Chart.setGallery(com.softwarefx.chartfx.desktop.Gallery), GlobalAttributes.setGallery(com.softwarefx.chartfx.desktop.Gallery), SeriesAttributes.setGallery(com.softwarefx.chartfx.desktop.Gallery), Chart, SeriesAttributes, GlobalAttributes

    setTension

    public void setTension(float value)

    Sets the Tension variable for the Cubic Spline curve algorithm.

    Remarks:
  • Using this property, you can create curves series drawn with 'loose' or 'tight' tension value. Think of the curve series as points connected by a rope. As you increase tension on the rope, the curves become more 'tight'. Decreasing the tension creates a more 'loose' looping curve.

  • See Also:
    Chart.setGallery(com.softwarefx.chartfx.desktop.Gallery), GlobalAttributes.setGallery(com.softwarefx.chartfx.desktop.Gallery), SeriesAttributes.setGallery(com.softwarefx.chartfx.desktop.Gallery), Chart, SeriesAttributes, GlobalAttributes

    http://www.softwarefx.com

    2008 Software FX, Inc. All Rights Reserved. Chart FX is a registered trademark of Software FX, Inc
    All other names are trademarks or registered trademarks of their respective owners.