Code Monkey home page Code Monkey logo

d3's People

Contributors

granicz avatar jand42 avatar jooseppi12 avatar qwe2 avatar simonjf avatar steiner2001 avatar t0yv0 avatar tahahachana avatar tarmil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

d3's Issues

.Data( doesn't seem to work

from here:
http://www.websharper.com/extensions/d3

D3.SelectAll("p").Data([|4; 8; 15; 16; 23; 42|]).Style("font-size", fun (d, _) -> string d + "px") |> ignore

Generates these errors!
Error 3 Possible overload: 'Selection.Data(values: obj []) : UpdateSelection'. Type constraint mismatch. The type
int []
is not compatible with type
obj []
The type 'obj' does not match the type 'int'. c:\projects\websharper\exp\Client.fs 56 9 exp
Error 5 Possible overload: 'Selection.Data(values: obj * int -> obj []) : UpdateSelection'. Type constraint mismatch. The type
int []
is not compatible with type
obj * int -> obj []
The type 'int []' is not compatible with the type 'obj * int -> obj []'. c:\projects\websharper\exp\Client.fs 56 9 exp
Error 4 Possible overload: 'Selection.Data(values: Core.Functions.Func<Dom.Element,obj,int,obj []>) : UpdateSelection'. Type constraint mismatch. The type
int []
is not compatible with type
Core.Functions.Func<Dom.Element,obj,int,obj []>
The type 'int []' is not compatible with the type 'Core.Functions.Func<Dom.Element,obj,int,obj []>'. c:\projects\websharper\exp\Client.fs 56 9 exp
Error 2 No overloads match for method 'Data'. The available overloads are shown below (or in the Error List window). c:\projects\websharper\exp\Client.fs 56 9 exp

Delay overload for transitions missing

Transitions also allow delays to be specified on sub-transitions, using a function which takes an object and its index, much like with Attr:

            transition.SelectAll(".bar")
                .Attr("x",
                    (fun (o, i) ->
                        let d = o :?> LetterData
                        x0.Apply(d.Letter)))

See https://github.com/mbostock/d3/wiki/Transitions:

# transition.delay([delay])

Specifies the transition delay in milliseconds. If delay is a constant, then all elements are given the same delay; otherwise, if delay is a function, then the function is evaluated for each selected element (in order), being passed the current datum d and the current index i, with the this context as the current DOM element. The function's return value is then used to set each element's delay. The default delay is 0. If delay is not specified, returns the delay bound to the first non-null element in the transition.

Setting the delay to be a multiple of the index i is a convenient way to stagger transitions for elements. For example, if you used a fixed duration of duration, and have n elements in the current selection, you can stagger the transition over 2 * duration by saying:

.delay(function(d, i) { return i / n * duration; })
You may also compute the delay as a function of the data, thereby creating a data-driven animation.

While a delay may be specified for the entire transition, this function overload doesn't seem to exist.

Force.Nodes binding type

I am using something like this:

type Force with
    [<Inline "$0.nodes($1)">]
    member f.Nodes(xs: array<ForceNode>) = f

Not typeable with current binding.

Review Geo projections: albers.raw etc

The "foo.raw" methods are not accepted by the WIG backend, for now I am commenting them out. Looking at latest D3 docs, I am not sure those methods are even present.

Need to review how this is used and how to properly bind it.

D3 v4?

Hi guys,
Are there any plans to:

  • update this to D3 v4?
  • or maybe provide an automated way of importing TypeScript definitions?

Duplicate type in assembly

Duplicate type with name 'IntelliFactory.WebSharper.D3.Polygon' in assembly 'IntelliFactory.WebSharper.D3, Version=2.5.0.0, Culture=neutral, PublicKeyToken=dcd983dec8f76a71'.

Here is a list of issues revealed by PEVerify:

  • Methods of the shape "foo.raw" => X are broken
  • Attributes on Interface types are invalid
  • Attributes on Interface methods are invalid
  • There are duplicate method definitions in Main.fs here, not detected by Cecil backend

selection.Call(force.Drag) does not work

Currently this does not work as in the samples. I have been using this workaround:

type Force with

    [<Inline "$1.call($0.drag)">]
    member f.EnableDrag(sel: Selection) = f.Drag

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.