All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.datacleaner.visualization.StackedAreaAnalyzerChartScriptHeadElement.scala Maven / Gradle / Ivy

There is a newer version: 6.0.0
Show newest version
package org.datacleaner.visualization

import java.util.Date

import org.datacleaner.result.html.{HeadElement, HtmlRenderingContext}

import scala.collection.JavaConverters._

class StackedAreaAnalyzerChartScriptHeadElement(result: IStackedAreaAnalyzerResult, elementId: String) extends HeadElement {

  override def toHtml(context: HtmlRenderingContext): String = {
    val html = new StringBuilder

    html.append("""
  """);

    return html.toString
  }

  def toNumber(x: Any): Number = {
    if (x.isInstanceOf[Number]) {
      return x.asInstanceOf[Number]
    }
    if (x.isInstanceOf[Date]) {
      return x.asInstanceOf[Date].getTime()
    }
    throw new UnsupportedOperationException("Encountered unexpected non-number: " + x)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy