-
Notifications
You must be signed in to change notification settings - Fork 28
svg.line, line.x, line.y #7
Comments
https://github.com/mbostock/d3/wiki/SVG-Shapes#_line wrote
so i will change it to
ok?
|
Thx for the update. Makes it possible to implement the example now. def x[Datum >: T](x: js.Function2[Datum, Int, Double]): Line[T] = js.native
def x[Datum >: T](x: js.Function1[Datum, Double]): Line[T] = js.native for a native trait, see http://www.scala-js.org/doc/interoperability/facade-types.html
|
Instead of tons of overloading i declare (an other) implicit for it |
I'm trying to do something very similar to this and have been using this example as a guide. However, this example does not compile. Specifically, the line type mismatch; found : scala.scalajs.js.Array[view.graphs.LineGraphExample.Data] required: view.graphs.LineGraphExample.Data I'm not a very experience scala developer and this is driving me nuts so any help would be greatly appreciated. |
I eventually solved this. It should be
|
I re-implemented http://bl.ocks.org/d3noob/b3ff6ae1c120eea654b5
To do this I had to apply following changes in
svg.scala
:The example
The text was updated successfully, but these errors were encountered: