com.harana.scalajs.react.sparkline.LineSeries.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scalajs-react-sparkline_sjs0.6_2.12 Show documentation
Show all versions of scalajs-react-sparkline_sjs0.6_2.12 Show documentation
scala.js facade for @dataui-sparkline
The newest version!
package com.harana.scalajs.react.sparkline
import com.harana.scalajs.react.macros.JSMacro
import com.harana.scalajs.react.sparkline.LineSeries._
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.html_<^._
import scala.scalajs.js
import scala.scalajs.js.annotation.JSImport
import scala.scalajs.js.|
@JSImport("@data-ui/sparkline", "LineSeries")
@js.native
object LineSeriesRequire extends js.Any
case class LineSeries(
fill: js.UndefOr[String | Fill] = js.undefined,
fillOpacity: js.UndefOr[Double | FillOpacity] = js.undefined,
curve: js.UndefOr[String] = js.undefined,
onMouseMove: js.UndefOr[OnMouseMove] = js.undefined,
onMouseLeave: js.UndefOr[OnMouseLeave] = js.undefined,
showArea: js.UndefOr[Boolean] = js.undefined,
showLine: js.UndefOr[Boolean] = js.undefined,
stroke: js.UndefOr[String] = js.undefined,
strokeDasharray: js.UndefOr[String] = js.undefined,
strokeLinecap: js.UndefOr[String] = js.undefined,
strokeWidth: js.UndefOr[Int] = js.undefined
){
def apply() = {
val props = JSMacro[LineSeries](this)
val f = JsComponent[js.Object, Children.None, Null](LineSeriesRequire)
f(props)
}
}
object LineSeries {
type Fill = (Double, Int) => String
type FillOpacity = (Double, Int) => Double
type OnMouseMove = (ReactEvent, js.Array[Double], Double, String) => Callback
type OnMouseLeave = (ReactEvent, js.Array[Double], Double, String) => Callback
implicit def toVdomNode(l: LineSeries): VdomNode = l()
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy