I think I found a bug …

Home Forums Procoding I think I found a bug …

Tagged: , ,

This topic contains 4 replies, has 1 voice, and was last updated by  Madeline Coven 4 years, 11 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1029

    Madeline Coven

    Things were going well with learning d3, but the program did not recognize the .style method.

    Thanks in advance for your help.

    #1030

    audiocommander
    Keymaster

    Hi Madeline,

    I’m using .style with d3 all the time, so I am almost certain that this is not a bug.
    It’s more likely that the CSS style can’t be applied because the selector name or writing is wrong, can’t be applied or gets overridden somewhere else.

    If on OS X, you should test the style in the debug inspector first. If this works and .style still doesn’t, you should provide more infos (platform, relevant snippet…)

    Regards,
    Michael

    #1031

    Madeline Coven

    Hi Michael,

    I am using Procoding on iOS 7 to learn d3 from a book called Interactive Visualizations for the Web, by Scott Murray, and this is the relevant code snippet:

    .style("color", "red");

    Madeline

    #1032

    audiocommander
    Keymaster

    Hi Madeline,

    it really depends on what element you’re applying the style.
    .style(“color”,”red”) only works on HTML elements. If you have an SVG element, you should use .style(“fill”,”red”).

    also see https://github.com/mbostock/d3/wiki/Tutorials

    Hope this helps,
    regards,
    Michael

    #1033

    Madeline Coven

    It did help, but what is the moz option for Mozilla?

    Madeline

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘I think I found a bug …’ is closed to new replies.