Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: d3

  1. #1

    Default d3

    Hi,
    Exist a way to import a d3 graph into a dashboard? How can i use a datasource from cde with the d3 graph?
    Thanks

  2. #2

    Default

    This is a hack. We did it this way before CCC supported negative and positive stacked bars. The draw function writes a d3 chart to the htmlobject. This is in the postExecution of a dummy barchart.

    function(){
    var dataSet = this.query.lastResults().resultset;
    var dDates = _.uniq(_.pluck(dataSet, [0]))
    var series = _.uniq(_.pluck(dataSet, [1]))
    var htmlobject = "#"+ this.htmlObject
    d3.select(htmlobject).selectAll('svg').remove()
    var h = 500, w = 1000, margin = 40
    draw(dDates, series, dataSet, htmlobject, h, w, margin)
    }

  3. #3
    Join Date
    Mar 2012
    Posts
    645

    Default

    You may use the Raphael component as a starting point to develop the d3 component:
    https://github.com/webdetails/cde/tr...onents/Raphael

    Then, share it with us!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.