d3.js - reference for `nvd3` layout formatting -


i moving plotly.js nvd3 because of better performance reasons ui-grid celltemplates...

in plotly created scatter graph 2 traces 1 represented line(spline: smoothed line) , 1 markers both showing on same graph such as: enter image description here

also values represented in log10 scale , yaxis ranging -25 125

plotly data , layout format:

var promise = plotly.newplot(el,     [      {x : simulateddoses,       y : simulatedresponses,       type : 'scatter',       mode : 'lines',       line:{shape:'spline', color: '#0887a7'}      }     ,{       x : dbo.get4(">doses"),       y : dbo.get4(">doseresponses"),       type : 'scatter',       mode : 'markers',       marker : {         color : 'coral',       }               }     ],      {       font: {family: 'arial narrow', size: 10},       showlegend:false,       // dimensions, if any, parent       width: parseint(angular.element(el).parent()[0].style.width),       height: parseint(angular.element(el).parent()[0].style.height),       margin:{t:30,l:30,r:30,b:30},       title: dbo.get4(">drug>*>displayname").join(" + "),       xaxis:{         type: 'log',          tickvals: doses,         ticktext: doses,         zeroline: true,          showline: true,          showgrid: true       },       yaxis:{zeroline:true, showline:true, showgrid:true, range:[-25,125]}     },      {displaymodebar: false, staticplot: true}   ); 

i don't find after in docs: http://nvd3-community.github.io/nvd3/examples/documentation.html#sparklineplus

so far(with nvd3) have template:

<div class="ui-grid-cell-contents">   <nvd3 options="col_field.spark.options" data="col_field.spark.data" class="with-3d-shadow with-transitions">   </nvd3> </div> 

and data(col_field dbo):

    var thedata = [];     (var z=0; z<100; z++) {       thedata.push({x:simulateddoses[z], y:simulatedresponses[z]});     }      dbo.spark= {       options: {         chart: {           type: 'sparklineplus',           height: 80,           width: 280,           nodata: ' '           }       },       data: thedata        }     }; 

resulting in:

enter image description here


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -