Package

scalax.chart

module

Permalink

package module

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.

Source
package.scala
Linear Supertypes
AnyRef, Any
Content Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. module
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait BoxAndWhiskerChartFactories extends BoxAndWhiskerDatasetConversions with DocMacros

    Permalink

    Contains factories to create box charts.

  2. trait BoxAndWhiskerDatasetConversions extends Converting with RichChartingCollections

    Permalink

    Provides converters for datasets used for box charts.

  3. trait CategoryChartFactories extends DatasetConversions with RichPlot with DocMacros

    Permalink

    CategoryChartFactories contains all high-level factories to conveniently create charts based on category datasets.

  4. trait CategoryDatasetConversions extends Converting with RichChartingCollections

    Permalink

    Provides converters for datasets used for category charts and multiple pie charts.

  5. trait CategoryLabelGenerators extends Imports

    Permalink

    CategoryLabelGenerators contains factories for creating label generators for category charts.

    CategoryLabelGenerators contains factories for creating label generators for category charts.

    chart.labelGenerator = CategoryLabelGenerator(value => value.toString)

    The following list contains various ways on how to create and set label generators for category charts:

    val data = for (i <- 1 to 5) yield (i,i)
    val chart = BarChart(data)
    
    chart.labelGenerator = (dataset: CategoryDataset, series: Comparable[_], category: Comparable[_]) =>
      dataset.getValue(series,category).toString
    
    chart.labelGenerator = CategoryLabelGenerator { (dataset, series, category) =>
      dataset.getValue(series,category).toString
    }
    
    chart.labelGenerator = CategoryLabelGenerator(_.getValue(_,_).toString)
    
    chart.labelGenerator = CategoryLabelGenerator(value => value.toString)
    
    chart.labelGenerator = CategoryLabelGenerator(_.toString)
    
    chart.labelGenerator = CategoryLabelGenerator.Default
  6. trait CategoryToolTipGenerators extends Imports

    Permalink

    CategoryToolTipGenerators contains factories for creating tool tip generators for category charts.

    CategoryToolTipGenerators contains factories for creating tool tip generators for category charts.

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

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

    val data = for (i <- 1 to 5) yield (i,i)
    val chart = BarChart(data)
    
    chart.tooltipGenerator = (dataset: CategoryDataset, series: Comparable[_], category: Comparable[_]) =>
      dataset.getValue(series,category).toString
    
    chart.tooltipGenerator = CategoryToolTipGenerator { (dataset, series, category) =>
      dataset.getValue(series,category).toString
    }
    
    chart.tooltipGenerator = CategoryToolTipGenerator(_.getValue(_,_).toString)
    
    chart.tooltipGenerator = CategoryToolTipGenerator(value => value.toString)
    
    chart.tooltipGenerator = CategoryToolTipGenerator(_.toString)
    
    chart.tooltipGenerator = CategoryToolTipGenerator.Default
  7. trait ChartFactories extends BoxAndWhiskerChartFactories with CategoryChartFactories with PieChartFactories with SpiderWebChartFactory with XYChartFactories with DatasetConversions with DocMacros

    Permalink

    ChartFactories contains all high-level factories to conveniently create charts.

    ChartFactories contains all high-level factories to conveniently create charts.

    val data = for (i <- 1 to 5) yield (i,i)
    val chart = XYLineChart(data)

    Creating Charts

    The only argument needed to create a chart is a dataset:

    val data = for (i <- 1 to 5) yield (i,i)
    val dataset = data.toXYSeriesCollection("some data")
    val chart = XYLineChart(dataset)

    Creating Charts with Themes

    The default theme used is the JFreeChart theme. To apply a different theme to the charts created by the factories, simply define an implicit chart theme in scope, e.g. the darkness theme from JFreeChart:

    implicit val theme = org.jfree.chart.StandardChartTheme.createDarknessTheme
  8. trait Charting extends ChartFactories with DatasetConversions with Exporting with RichPlot with LabelGenerators with ToolTipGenerators

    Permalink

    Contains all enrichments.

    Contains all enrichments.

    Creating Charts

    ChartFactories contains all high-level factories to conveniently create charts.

    val data = for (i <- 1 to 5) yield (i,i)
    val chart = XYLineChart(data)

    Exporting Charts

    Exporting contains enrichments to conveniently export charts to disk.

    chart.saveAsPNG("/tmp/chart.png")

    Labels

    LabelGenerators contains means to conveniently create label generators for all supported chart types.

    val chart = PieChart(data)
    chart.labelGenerator = PieLabelGenerator(value => value.toString)

    Rich Plots

    RichPlot contains enriched plot types to conveniently work with the plot domain, range and marking.

    chart.plot.domain.axis.label.text = "my label"
    chart.plot.range.markers += ((1,1))

    Tool Tips

    ToolTipGenerators contains means to conveniently create tool tip generators for all supported chart types.

    val chart = PieChart(data)
    chart.tooltipGenerator = PieToolTipGenerator(value => value.toString)
  9. trait Converting extends AnyRef

    Permalink

    Provides the Converter type class and a generic ConverterCompanion for it.

  10. trait DatasetConversions extends BoxAndWhiskerDatasetConversions with CategoryDatasetConversions with PieDatasetConversions with TableXYDatasetConversions with XYDatasetConversions

    Permalink

    Provides all dataset converters.

  11. trait Exporting extends AnyRef

    Permalink

    Exporting contains enrichments to conveniently export charts to disk.

    Exporting contains enrichments to conveniently export charts to disk.

    chart.saveAsPNG("/tmp/chart.png")

    Supported Formats

    Charts may be exported into the following formats:

    • JPEG
    • PNG
    • PDF, needs the optional dependency "com.itextpdf" % "itextpdf" on your class path
    • SVG, needs the optional dependency "org.jfree" % "jfreesvg" on your class path

    Export Stages

    There are different stages in which charts may be exported: encoding, writing and the actual saving of the file, which is demonstrated by the following code snippet:

    val bytes = chart.encodeAsPNG()
    
    chart.writeAsPNG(System.out)
    
    chart.saveAsPNG("/tmp/chart.png")
  12. trait Imports extends AnyRef

    Permalink

    Contains imports from other libraries, most notably JFreeChart.

  13. trait LabelGenerators extends CategoryLabelGenerators with PieLabelGenerators with XYLabelGenerators

    Permalink

    LabelGenerators contains means to conveniently create label generators for all supported chart types.

    LabelGenerators contains means to conveniently create label generators for all supported chart types.

    val chart = PieChart(data)
    chart.labelGenerator = PieLabelGenerator(value => value.toString)

    Labels for Category Charts

    CategoryLabelGenerators contains factories for creating label generators for category charts.

    chart.labelGenerator = CategoryLabelGenerator(value => value.toString)

    Labels for Pie-like Charts

    PieLabelGenerators contains factories for creating label generators for pie charts.

    chart.labelGenerator = PieLabelGenerator(value => value.toString)

    Labels for XY Charts

    XYLabelGenerators contains factories for creating label generators for xy charts.

    chart.labelGenerator = XYLabelGenerator(value => value.toString)
  14. trait MarkerConversions extends Imports

    Permalink

    MarkerConversions contains type class based conversions from certain types to Marker instances.

    MarkerConversions contains type class based conversions from certain types to Marker instances.

    chart.plot.domain.markers += 1

    All numeric types and numeric ranges are supported to create simple value markers:

    chart.plot.range.markers += 3
    chart.plot.range.markers += 3L
    chart.plot.range.markers += 3.0
    chart.plot.range.markers += ((1.0,2.0))

    There is also an additional conversion type class for the domain of CategoryCharts you can use for CategoryMarkers, which support arbitrary Comparables like String:

    chart.plot.domain.markers += "category"

    The legacy JFreeChart classes can still be used directly:

    chart.plot.range.markers += new ValueMarker(3.0)
    chart.plot.range.markers += new IntervalMarker(1.0, 2.0)
    
    chart.plot.domain.markers += new CategoryMarker("category")
  15. trait PieChartFactories extends AnyRef

    Permalink

    Contains factories to create pie charts and other pie-like chart.

  16. trait PieDatasetConversions extends Converting with RichChartingCollections

    Permalink

    Provides converters for datasets used for pie charts and ring charts.

  17. trait PieLabelGenerators extends Imports

    Permalink

    PieLabelGenerators contains factories for creating label generators for pie charts.

    PieLabelGenerators contains factories for creating label generators for pie charts.

    chart.labelGenerator = PieLabelGenerator(value => value.toString)

    The following list contains various ways on how to create and set label generators for pie charts:

    val data = for (i <- 1 to 5) yield (i,i)
    val chart = PieChart(data)
    
    chart.labelGenerator = (dataset: PieDataset, key: Comparable[_]) =>
      dataset.getValue(key).toString
    
    chart.labelGenerator = PieLabelGenerator { (dataset, key) =>
      dataset.getValue(key).toString
    }
    
    chart.labelGenerator = PieLabelGenerator(_.getValue(_).toString)
    
    chart.labelGenerator = PieLabelGenerator(value => value.toString)
    
    chart.labelGenerator = PieLabelGenerator(_.toString)
    
    chart.labelGenerator = PieLabelGenerator.Default
  18. trait PieToolTipGenerators extends Imports

    Permalink

    PieToolTipGenerators contains factories for creating tool tip generators for pie charts.

    PieToolTipGenerators contains factories for creating tool tip generators for pie charts.

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

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

    val data = for (i <- 1 to 5) yield (i,i)
    val chart = PieChart(data)
    
    chart.tooltipGenerator = (dataset: PieDataset, key: Comparable[_]) =>
      dataset.getValue(key).toString
    
    chart.tooltipGenerator = PieToolTipGenerator { (dataset, key) =>
      dataset.getValue(key).toString
    }
    
    chart.tooltipGenerator = PieToolTipGenerator(_.getValue(_).toString)
    
    chart.tooltipGenerator = PieToolTipGenerator(value => value.toString)
    
    chart.tooltipGenerator = PieToolTipGenerator(_.toString)
    
    chart.tooltipGenerator = PieToolTipGenerator.Default
  19. trait RichChartingCollections extends Imports

    Permalink

    Contains enrichments for collections for conversions to datasets.

    Contains enrichments for collections for conversions to datasets. To see which conversions are provided have a look at the classes defined below.

  20. trait RichPlot extends MarkerConversions

    Permalink

    RichPlot contains enriched plot types to conveniently work with the plot domain, range and marking.

    RichPlot contains enriched plot types to conveniently work with the plot domain, range and marking.

    chart.plot.domain.axis.label.text = "my label"
    chart.plot.range.markers += ((1,1))

    Marking

    There are enrichments concerning the handling of markers in plots:

    chart.plot.domain.markers += 1
    chart.plot.range.markers += ((1,1))
    
    for (marker <- chart.plot.range.markers) {
      // do something with marker
    }

    Marker Conversions

    MarkerConversions contains type class based conversions from certain types to Marker instances.

    chart.plot.domain.markers += 1
  21. trait SpiderWebChartFactory extends AnyRef

    Permalink

    Contains factories to create spider web charts aka radar charts.

  22. trait TableXYDatasetConversions extends Converting with RichChartingCollections

    Permalink

    Provides converters for TableXYDatasets.

  23. trait ToolTipGenerators extends CategoryToolTipGenerators with PieToolTipGenerators with XYToolTipGenerators

    Permalink

    ToolTipGenerators contains means to conveniently create tool tip generators for all supported chart types.

    ToolTipGenerators contains means to conveniently create tool tip generators for all supported chart types.

    val chart = PieChart(data)
    chart.tooltipGenerator = PieToolTipGenerator(value => value.toString)

    Tool Tips for Category Charts

    CategoryToolTipGenerators contains factories for creating tool tip generators for category charts.

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

    Tool Tips for Pie-like Charts

    PieToolTipGenerators contains factories for creating tool tip generators for pie charts.

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

    Tool Tips for XY Charts

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

    chart.tooltipGenerator = XYToolTipGenerator(value => value.toString)
  24. trait XYChartFactories extends DatasetConversions with DocMacros

    Permalink

    XYChartFactories contains all high-level factories to conveniently create xy charts.

  25. trait XYDatasetConversions extends Converting with RichChartingCollections

    Permalink

    Provides converters for datasets used for xy charts.

  26. trait XYLabelGenerators extends Imports

    Permalink

    XYLabelGenerators contains factories for creating label generators for xy charts.

    XYLabelGenerators contains factories for creating label generators for xy charts.

    chart.labelGenerator = XYLabelGenerator(value => value.toString)

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

    val data = for (i <- 1 to 5) yield (i,i)
    val chart = XYLineChart(data)
    
    chart.labelGenerator = (dataset: XYDataset, series: Comparable[_], item: Int) =>
      val idx = dataset.indexOf(series)
      dataset.getY(idx, item).toString
    }
    
    chart.labelGenerator = XYLabelGenerator { (dataset, series, item) =>
      val idx = dataset.indexOf(series)
      dataset.getY(idx,item).toString
    }
    
    chart.labelGenerator = XYLabelGenerator(value => value.toString)
    
    chart.labelGenerator = XYLabelGenerator(_.toString)
    
    chart.labelGenerator = XYLabelGenerator((x,y) => s"""($x,$y)""")
    
    chart.labelGenerator = XYLabelGenerator.Default
  27. trait XYToolTipGenerators extends Imports

    Permalink

    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

Value Members

  1. object BoxAndWhiskerChartFactories extends BoxAndWhiskerChartFactories

    Permalink

    Contains factories to create box charts.

  2. object BoxAndWhiskerDatasetConversions extends BoxAndWhiskerDatasetConversions

    Permalink

    Provides converters for datasets used for box charts.

  3. object CategoryChartFactories extends CategoryChartFactories

    Permalink

    CategoryChartFactories contains all high-level factories to conveniently create charts based on category datasets.

  4. object CategoryDatasetConversions extends CategoryDatasetConversions

    Permalink

    Provides converters for datasets used for category charts and multiple pie charts.

  5. object CategoryLabelGenerators extends CategoryLabelGenerators

    Permalink

    CategoryLabelGenerators contains factories for creating label generators for category charts.

    CategoryLabelGenerators contains factories for creating label generators for category charts.

    chart.labelGenerator = CategoryLabelGenerator(value => value.toString)

    The following list contains various ways on how to create and set label generators for category charts:

    val data = for (i <- 1 to 5) yield (i,i)
    val chart = BarChart(data)
    
    chart.labelGenerator = (dataset: CategoryDataset, series: Comparable[_], category: Comparable[_]) =>
      dataset.getValue(series,category).toString
    
    chart.labelGenerator = CategoryLabelGenerator { (dataset, series, category) =>
      dataset.getValue(series,category).toString
    }
    
    chart.labelGenerator = CategoryLabelGenerator(_.getValue(_,_).toString)
    
    chart.labelGenerator = CategoryLabelGenerator(value => value.toString)
    
    chart.labelGenerator = CategoryLabelGenerator(_.toString)
    
    chart.labelGenerator = CategoryLabelGenerator.Default
  6. object CategoryToolTipGenerators extends CategoryToolTipGenerators

    Permalink

    CategoryToolTipGenerators contains factories for creating tool tip generators for category charts.

    CategoryToolTipGenerators contains factories for creating tool tip generators for category charts.

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

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

    val data = for (i <- 1 to 5) yield (i,i)
    val chart = BarChart(data)
    
    chart.tooltipGenerator = (dataset: CategoryDataset, series: Comparable[_], category: Comparable[_]) =>
      dataset.getValue(series,category).toString
    
    chart.tooltipGenerator = CategoryToolTipGenerator { (dataset, series, category) =>
      dataset.getValue(series,category).toString
    }
    
    chart.tooltipGenerator = CategoryToolTipGenerator(_.getValue(_,_).toString)
    
    chart.tooltipGenerator = CategoryToolTipGenerator(value => value.toString)
    
    chart.tooltipGenerator = CategoryToolTipGenerator(_.toString)
    
    chart.tooltipGenerator = CategoryToolTipGenerator.Default
  7. object ChartFactories extends ChartFactories

    Permalink

    ChartFactories contains all high-level factories to conveniently create charts.

    ChartFactories contains all high-level factories to conveniently create charts.

    val data = for (i <- 1 to 5) yield (i,i)
    val chart = XYLineChart(data)

    Creating Charts

    The only argument needed to create a chart is a dataset:

    val data = for (i <- 1 to 5) yield (i,i)
    val dataset = data.toXYSeriesCollection("some data")
    val chart = XYLineChart(dataset)

    Creating Charts with Themes

    The default theme used is the JFreeChart theme. To apply a different theme to the charts created by the factories, simply define an implicit chart theme in scope, e.g. the darkness theme from JFreeChart:

    implicit val theme = org.jfree.chart.StandardChartTheme.createDarknessTheme
  8. object Charting extends Charting

    Permalink

    Contains all enrichments.

    Contains all enrichments.

    Creating Charts

    ChartFactories contains all high-level factories to conveniently create charts.

    val data = for (i <- 1 to 5) yield (i,i)
    val chart = XYLineChart(data)

    Exporting Charts

    Exporting contains enrichments to conveniently export charts to disk.

    chart.saveAsPNG("/tmp/chart.png")

    Labels

    LabelGenerators contains means to conveniently create label generators for all supported chart types.

    val chart = PieChart(data)
    chart.labelGenerator = PieLabelGenerator(value => value.toString)

    Rich Plots

    RichPlot contains enriched plot types to conveniently work with the plot domain, range and marking.

    chart.plot.domain.axis.label.text = "my label"
    chart.plot.range.markers += ((1,1))

    Tool Tips

    ToolTipGenerators contains means to conveniently create tool tip generators for all supported chart types.

    val chart = PieChart(data)
    chart.tooltipGenerator = PieToolTipGenerator(value => value.toString)
  9. object Converting extends Converting

    Permalink

    Provides the Converter type class and a generic ConverterCompanion for it.

  10. object DatasetConversions extends DatasetConversions

    Permalink

    Provides all dataset converters.

  11. object Exporting extends Exporting

    Permalink

    Exporting contains enrichments to conveniently export charts to disk.

    Exporting contains enrichments to conveniently export charts to disk.

    chart.saveAsPNG("/tmp/chart.png")

    Supported Formats

    Charts may be exported into the following formats:

    • JPEG
    • PNG
    • PDF, needs the optional dependency "com.itextpdf" % "itextpdf" on your class path
    • SVG, needs the optional dependency "org.jfree" % "jfreesvg" on your class path

    Export Stages

    There are different stages in which charts may be exported: encoding, writing and the actual saving of the file, which is demonstrated by the following code snippet:

    val bytes = chart.encodeAsPNG()
    
    chart.writeAsPNG(System.out)
    
    chart.saveAsPNG("/tmp/chart.png")
  12. object Imports extends Imports

    Permalink

    Contains imports from other libraries, most notably JFreeChart.

  13. object LabelGenerators extends LabelGenerators

    Permalink

    LabelGenerators contains means to conveniently create label generators for all supported chart types.

    LabelGenerators contains means to conveniently create label generators for all supported chart types.

    val chart = PieChart(data)
    chart.labelGenerator = PieLabelGenerator(value => value.toString)

    Labels for Category Charts

    CategoryLabelGenerators contains factories for creating label generators for category charts.

    chart.labelGenerator = CategoryLabelGenerator(value => value.toString)

    Labels for Pie-like Charts

    PieLabelGenerators contains factories for creating label generators for pie charts.

    chart.labelGenerator = PieLabelGenerator(value => value.toString)

    Labels for XY Charts

    XYLabelGenerators contains factories for creating label generators for xy charts.

    chart.labelGenerator = XYLabelGenerator(value => value.toString)
  14. object MarkerConversions extends MarkerConversions

    Permalink

    MarkerConversions contains type class based conversions from certain types to Marker instances.

    MarkerConversions contains type class based conversions from certain types to Marker instances.

    chart.plot.domain.markers += 1

    All numeric types and numeric ranges are supported to create simple value markers:

    chart.plot.range.markers += 3
    chart.plot.range.markers += 3L
    chart.plot.range.markers += 3.0
    chart.plot.range.markers += ((1.0,2.0))

    There is also an additional conversion type class for the domain of CategoryCharts you can use for CategoryMarkers, which support arbitrary Comparables like String:

    chart.plot.domain.markers += "category"

    The legacy JFreeChart classes can still be used directly:

    chart.plot.range.markers += new ValueMarker(3.0)
    chart.plot.range.markers += new IntervalMarker(1.0, 2.0)
    
    chart.plot.domain.markers += new CategoryMarker("category")
  15. object PieChartFactories extends PieChartFactories

    Permalink

    Contains factories to create pie charts and other pie-like chart.

  16. object PieDatasetConversions extends PieDatasetConversions

    Permalink

    Provides converters for datasets used for pie charts and ring charts.

  17. object PieLabelGenerators extends PieLabelGenerators

    Permalink

    PieLabelGenerators contains factories for creating label generators for pie charts.

    PieLabelGenerators contains factories for creating label generators for pie charts.

    chart.labelGenerator = PieLabelGenerator(value => value.toString)

    The following list contains various ways on how to create and set label generators for pie charts:

    val data = for (i <- 1 to 5) yield (i,i)
    val chart = PieChart(data)
    
    chart.labelGenerator = (dataset: PieDataset, key: Comparable[_]) =>
      dataset.getValue(key).toString
    
    chart.labelGenerator = PieLabelGenerator { (dataset, key) =>
      dataset.getValue(key).toString
    }
    
    chart.labelGenerator = PieLabelGenerator(_.getValue(_).toString)
    
    chart.labelGenerator = PieLabelGenerator(value => value.toString)
    
    chart.labelGenerator = PieLabelGenerator(_.toString)
    
    chart.labelGenerator = PieLabelGenerator.Default
  18. object PieToolTipGenerators extends PieToolTipGenerators

    Permalink

    PieToolTipGenerators contains factories for creating tool tip generators for pie charts.

    PieToolTipGenerators contains factories for creating tool tip generators for pie charts.

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

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

    val data = for (i <- 1 to 5) yield (i,i)
    val chart = PieChart(data)
    
    chart.tooltipGenerator = (dataset: PieDataset, key: Comparable[_]) =>
      dataset.getValue(key).toString
    
    chart.tooltipGenerator = PieToolTipGenerator { (dataset, key) =>
      dataset.getValue(key).toString
    }
    
    chart.tooltipGenerator = PieToolTipGenerator(_.getValue(_).toString)
    
    chart.tooltipGenerator = PieToolTipGenerator(value => value.toString)
    
    chart.tooltipGenerator = PieToolTipGenerator(_.toString)
    
    chart.tooltipGenerator = PieToolTipGenerator.Default
  19. object RichChartingCollections extends RichChartingCollections

    Permalink

    Contains enrichments for collections for conversions to datasets.

    Contains enrichments for collections for conversions to datasets. To see which conversions are provided have a look at the classes defined below.

  20. object RichPlot extends RichPlot

    Permalink

    RichPlot contains enriched plot types to conveniently work with the plot domain, range and marking.

    RichPlot contains enriched plot types to conveniently work with the plot domain, range and marking.

    chart.plot.domain.axis.label.text = "my label"
    chart.plot.range.markers += ((1,1))

    Marking

    There are enrichments concerning the handling of markers in plots:

    chart.plot.domain.markers += 1
    chart.plot.range.markers += ((1,1))
    
    for (marker <- chart.plot.range.markers) {
      // do something with marker
    }

    Marker Conversions

    MarkerConversions contains type class based conversions from certain types to Marker instances.

    chart.plot.domain.markers += 1
  21. object SpiderWebChartFactory extends SpiderWebChartFactory

    Permalink

    Contains factories to create spider web charts aka radar charts.

  22. object TableXYDatasetConversions extends TableXYDatasetConversions

    Permalink

    Provides converters for TableXYDatasets.

  23. object ToolTipGenerators extends ToolTipGenerators

    Permalink

    ToolTipGenerators contains means to conveniently create tool tip generators for all supported chart types.

    ToolTipGenerators contains means to conveniently create tool tip generators for all supported chart types.

    val chart = PieChart(data)
    chart.tooltipGenerator = PieToolTipGenerator(value => value.toString)

    Tool Tips for Category Charts

    CategoryToolTipGenerators contains factories for creating tool tip generators for category charts.

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

    Tool Tips for Pie-like Charts

    PieToolTipGenerators contains factories for creating tool tip generators for pie charts.

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

    Tool Tips for XY Charts

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

    chart.tooltipGenerator = XYToolTipGenerator(value => value.toString)
  24. object XYChartFactories extends XYChartFactories

    Permalink

    XYChartFactories contains all high-level factories to conveniently create xy charts.

  25. object XYDatasetConversions extends XYDatasetConversions

    Permalink

    Provides converters for datasets used for xy charts.

  26. object XYLabelGenerators extends XYLabelGenerators

    Permalink

    XYLabelGenerators contains factories for creating label generators for xy charts.

    XYLabelGenerators contains factories for creating label generators for xy charts.

    chart.labelGenerator = XYLabelGenerator(value => value.toString)

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

    val data = for (i <- 1 to 5) yield (i,i)
    val chart = XYLineChart(data)
    
    chart.labelGenerator = (dataset: XYDataset, series: Comparable[_], item: Int) =>
      val idx = dataset.indexOf(series)
      dataset.getY(idx, item).toString
    }
    
    chart.labelGenerator = XYLabelGenerator { (dataset, series, item) =>
      val idx = dataset.indexOf(series)
      dataset.getY(idx,item).toString
    }
    
    chart.labelGenerator = XYLabelGenerator(value => value.toString)
    
    chart.labelGenerator = XYLabelGenerator(_.toString)
    
    chart.labelGenerator = XYLabelGenerator((x,y) => s"""($x,$y)""")
    
    chart.labelGenerator = XYLabelGenerator.Default
  27. object XYToolTipGenerators extends XYToolTipGenerators

    Permalink

    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

Inherited from AnyRef

Inherited from Any

Ungrouped