plottable.js

How to enable qtip2 in Piechart made by Plottable.js/D3.js

若如初见. 提交于 2020-01-11 14:03:44
问题 I have this code, which tried to enable qtip in plottable.js var store = [{ Name:"Item 1", Total:18.73424242 }, { Name:"Item 2", Total:7.34311 }, { Name:"Item 3", Total:3.1235535}, { Name:"Item 4", Total:12.763574}]; var colorScale = new Plottable.Scales.Color(); var legend = new Plottable.Components.Legend(colorScale); var pie = new Plottable.Plots.Pie() .attr("fill", function(d){ return d.Name; }, colorScale) .addDataset(new Plottable.Dataset(store)) .attr("qtip2-title", function(d) {

How to make label in histogram respond to dynamic user input

旧街凉风 提交于 2019-12-31 00:59:10
问题 I have the following working code. It takes the input data and display the histogram based on a threshold. If you run, the code below, the code is working to the extend that the histogram changes as you drag the sliding bar. However the label 26 GENES does not change as we drag the threshold from 1.5 to 2. I expect the value change to 30 GENES . These values are encoded in the var input_data especially nof_genes . How can I make that to take effect? "use strict"; var histograms, thresholds =

How to enable qtip2 in Piechart made by Plottable.js/D3.js

99封情书 提交于 2019-12-02 10:28:18
I have this code, which tried to enable qtip in plottable.js var store = [{ Name:"Item 1", Total:18.73424242 }, { Name:"Item 2", Total:7.34311 }, { Name:"Item 3", Total:3.1235535}, { Name:"Item 4", Total:12.763574}]; var colorScale = new Plottable.Scales.Color(); var legend = new Plottable.Components.Legend(colorScale); var pie = new Plottable.Plots.Pie() .attr("fill", function(d){ return d.Name; }, colorScale) .addDataset(new Plottable.Dataset(store)) .attr("qtip2-title", function(d) { return '<div class="bartip">' + d.Name + " (" + d.Total.toFixed(2) + ')</div>'; }) .addClass("tooltipped")