Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rickshaw renders a black SVG when using axes #186

Closed
metmajer opened this issue Jan 21, 2013 · 3 comments
Closed

Rickshaw renders a black SVG when using axes #186

metmajer opened this issue Jan 21, 2013 · 3 comments

Comments

@metmajer
Copy link

The following sample document produces a black SVG with the most recent version of Rickshaw taken from Github. When I remove both axes the graph is rendered correctly (without axes of course).

<!doctype html>

<meta charset="utf-8"/>

<script src="../lib/d3.js"></script>
<script src="../lib/rickshaw.js"></script>

<div id="graph"></div>

<script>
var graph = new Rickshaw.Graph( {
  element: document.querySelector('#graph'),
  series: [
    {
      color: 'steelblue',
      data: [ { x: 0, y: 23}, { x: 1, y: 15 }, { x: 2, y: 79 } ]
    }, {
      color: 'lightblue',
      data: [ { x: 0, y: 30}, { x: 1, y: 20 }, { x: 2, y: 64 } ]
    }
  ]
} );

new Rickshaw.Graph.Axis.X({
    graph: graph
}).render();

new Rickshaw.Graph.Axis.X({
    graph: graph
}).render();

graph.render();
</script>
@dchester
Copy link
Contributor

Hi, you need to pull in rickshaw.css as well. That should get you going.

@pinscript
Copy link

I ran into this issue as well. Is it possible to console.warning or something similar if a user has enabled the console but not included the rickshaw.css?

@thirdcreed
Copy link

Which selectors in particular are influencing these axes? I can't use the CSS file with my svg and am having to select and apply attributes with d3 after the graphs are built.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants