Packages

  • package root
    Definition Classes
    root
  • package scalax
    Definition Classes
    root
  • package chart

    This package contains a library for creating and working with charts.

    This package contains a library for creating and working with charts. It wraps JFreeChart, much like scala.swing does with the original javax.swing package.

    Getting Started

    There is an all you can eat import providing all the high-level functionality of this library:

    import scalax.chart.api._
    
    val data = for (i <- 1 to 5) yield (i,i)
    val chart = XYLineChart(data)
    chart.saveAsPNG("/tmp/chart.png")

    All of the functionality of the api object is also contained by module.Charting, which you can either import or use as a mixin:

    object MyChartApp extends App with scalax.chart.module.Charting {
      val data = for (i <- 1 to 5) yield (i,i)
      val chart = XYLineChart(data)
      chart.saveAsPNG("/tmp/chart.png")
    }

    The module package provides a la carte imports, which you can import or mix in for only parts of the API. To find out more about the modules in detail, have a look at the documentation of the module.Charting module. From there on you can discover the modules one by one.

    Definition Classes
    scalax
  • package module

    This package provides a la carte imports.

    This package provides a la carte imports. It is organized into modules following the Scala's Selfless Trait Pattern. Some of these modules depend on each other. In this case, there is often a short documentation in the higher-level module and links to the lower-level modules. Have a look for yourself and start at the highest-level all you can eat module Charting.

    Definition Classes
    chart
  • trait XYToolTipGenerators extends Imports

    XYToolTipGenerators contains factories for creating tool tip generators for xy charts.

    XYToolTipGenerators contains factories for creating tool tip generators for xy charts.

    chart.tooltipGenerator = XYToolTipGenerator(value => value.toString)

    The following list contains various ways on how to create and set tool tip generators for xy charts:

    val data = for (i <- 1 to 5) yield (i,i)
    val chart = XYLineChart(data)
    
    chart.tooltipGenerator = (dataset: XYDataset, series: Comparable[_], item: Int) =>
      val idx = dataset.indexOf(series)
      dataset.getY(idx, item).toString
    }
    
    chart.tooltipGenerator = XYToolTipGenerator { (dataset, series, item) =>
      val idx = dataset.indexOf(series)
      dataset.getY(idx,item).toString
    }
    
    chart.tooltipGenerator = XYToolTipGenerator(value => value.toString)
    
    chart.tooltipGenerator = XYToolTipGenerator(_.toString)
    
    chart.tooltipGenerator = XYToolTipGenerator((x,y) => s"""($x,$y)""")
    
    chart.tooltipGenerator = XYToolTipGenerator.Default
    Definition Classes
    module
  • AxisLabelLocation
  • ChartTheme
  • Layer
  • XYToolTipGenerator

object XYToolTipGenerator

Tool tip generator factory for xy charts.

Source
XYToolTipGenerators.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. XYToolTipGenerator
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def Default: XYToolTipGenerators.XYToolTipGenerator

    Returns a new xy tool tip generator which simply calls toString on values.

  5. final def apply(f: (Number, Number) ⇒ String): XYToolTipGenerators.XYToolTipGenerator

    Returns a new tool tip generator by converting (x,y) pairs to strings.

  6. final def apply(f: (Number) ⇒ String): XYToolTipGenerators.XYToolTipGenerator

    Returns a new tool tip generator by converting values to strings.

  7. final def apply(generator: XYToolTipGenerators.XYToolTipGenerator): XYToolTipGenerators.XYToolTipGenerator

    Returns the given generator.

    Returns the given generator. This method exists solely for the purpose to avoid typing.

  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def fromPeer(jfree: org.jfree.chart.labels.XYToolTipGenerator): XYToolTipGenerators.XYToolTipGenerator

    Returns a new tool tip generator using an explicit peer.

  14. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  20. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  21. final def toPeer(generator: XYToolTipGenerators.XYToolTipGenerator): org.jfree.chart.labels.XYToolTipGenerator

    Returns a new peer.

  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped