Nikunj K.
Nikunj K.

Reputation: 9199

show dc chart on browser using node.js

I am using your dc js in node js for rendering dc chart via server but i am facing many problems.

  1. First I found all result of the svg in variable, but i want to know how to render chart in web browser.
  2. When i write that SVG tags to file like "index.html" trying to run that file to browser, Chart is displayed but filter is not wroking
  3. How we can use dc.js with node.js in browser?

I have tried many ways to get result, but i am not successed. If you have any tutorial or any guid Please let me know

Upvotes: 1

Views: 177

Answers (1)

Gordon
Gordon

Reputation: 20120

I have not experimented with using dc.js on the server side with node, but you should be able to write the svg tag into an html document.

For example, if you browse the DOM of a live site like http://dc-js.github.io/dc.js/ in the DOM, using the Elements tab of Chrome's Developer Tools, you'll see something like this:

<div class="row">
<div id="yearly-bubble-chart" class="dc-chart">
    <strong>Yearly Performance</strong> (radius: fluctuation/index ratio, color: gain/loss)
    <a class="reset" href="javascript:yearlyBubbleChart.filterAll();dc.redrawAll();" style="display: none;">reset</a>

    <div class="clearfix"></div>
<svg width="990" height="250"><g>

...

Note: I don't think you can get the interactive features of dc.js using it this way.

Upvotes: 1

Related Questions