dimple.js

Update dimple.js chart when select a new option

风格不统一 提交于 2019-12-17 19:26:10
问题 <select id="cs" name="cs" > <option value = "HIV+TB" >HIV+TB</option> <option value = "TB">TB</option> </select> <button id="btn">Click Me</button> <div id="chartContainer"> <script type="text/javascript"> var dropdown = d3.select("#cs") var cs2 = dropdown.node().options[dropdown.node().selectedIndex].value; d3.csv("test.csv", function (data) { var svg = dimple.newSvg("#chartContainer", 590, 600); var myChart = new dimple.chart(svg, data1990); myChart.setBounds(105, 25, 475, 465) myChart

Is there a working implemenation to fit multiple d3 charts like line, bar, etc on one page? [closed]

◇◆丶佛笑我妖孽 提交于 2019-12-13 13:32:07
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I am trying to fit multiple charts on a single jsp page. I have a combination of line and bar charts. I am using dimple API for d3.js. Please advice. Bootstrap doesnt seem to work with this. 回答1: Bootstrap seems to be simple to use: Add this in your .html file. <div class="row"> <div class="col-md-6" id="area1"><

automation of dimple.js charts with a configuration file

做~自己de王妃 提交于 2019-12-13 02:29:14
问题 I wanted to be able to change the type of charts made with dimple.js using variables. I am able to do it using local variables, set up manually, thanks to this post: change chart type in dimple.js to automate chart production However, when I am trying to go a step further and place all my variables in a configuration file, it does no longer work anymore. I'm pretty sure I'm missing something with the "objects", but can't figure what. Sorry, it might be an obvious thing I'm missing, but I'm a

Dimple.js - Add data labels to each bar of the bar chart

北战南征 提交于 2019-12-12 17:09:12
问题 I am using dimple.js, which is based on d3.js. Is it possible to add data labels to each bar of the bar chart mentioned in this example http://dimplejs.org/examples_viewer.html?id=bars_vertical <div id="chartContainer"> <script src="http://d3js.org/d3.v3.min.js"></script> <script src="http://dimplejs.org/dist/dimple.v1.min.js"></script> <script type="text/javascript"> var svg = dimple.newSvg("#chartContainer", 590, 400); d3.tsv("/data/example_data.tsv", function (data) { var myChart = new

Show properly x labels with rCharts and dimplejs

怎甘沉沦 提交于 2019-12-12 11:51:14
问题 Hi I drew a graph with rCharts using the dimple javascript library, but I have some trouble with x labels which don't appear properly, I tried to use setBounds and setMargins without any success. Any help is welcome! Thx # my data (I put all because with less data there's no problem : x labels appears horizontally) structure(list(date = c("2014-01-01", "2014-01-02", "2014-01-03", "2014-01-04", "2014-01-05", "2014-01-06", "2014-01-07", "2014-01-08", "2014-01-09", "2014-01-10", "2014-01-11",

How to make axis ticks clickable in d3.js/dimple.js

▼魔方 西西 提交于 2019-12-12 05:37:50
问题 I'm very new to d3js. I wish to know how to make axis tick labels to clickable so that clicking on the labels I can load new charts( yes I need to get the axis value, ie month name here in my case) Below is the code. X axis are months and once I click on a month, I need to load chart of that month, which is another HTML page. d3.csv("data/data_1.CSV", function (data) { var myChart = new dimple.chart(svg, data); myChart.setBounds(90, 70, 490, 320); var x = myChart.addTimeAxis("x", "Month", "%d

Creating an incomplete pie chart in Dimple.JS

六月ゝ 毕业季﹏ 提交于 2019-12-12 05:30:06
问题 I have a pie chart that needs to have a missing 10% missing slice. I have the following code but the pie is always 100%. var myChart = new dimple.chart(svg, data); myChart.setBounds(50, 50, 180, 180); myChart.defaultColors = chartOptions.colors; myChart.data.startAngle = 0; myChart.data.endAngle = (2 * Math.PI * 0.9); myAxis = myChart.addMeasureAxis('p', 'amount'); var mySeries = myChart.addSeries('legend', dimple.plot.pie); How do I make the pie less than 100%? The above example needs to

eventArgs in dimple.js appear incomplete

荒凉一梦 提交于 2019-12-12 04:57:57
问题 I've been working with Dimple.js recently and have found the need to change the default tooltip behavior in some cases. The method for doing this via the API is described here. However, the dimple.eventArgs object that is passed into the function that is supposed to contain all of the information about the hovered element that triggered the event appears to be lacking some of the data it should contain. jsFiddle example here. Hovering a point on the plot shows that the eventArgs object that

change chart type in dimple.js to automate chart production

两盒软妹~` 提交于 2019-12-12 04:36:13
问题 I would like to be able to change the chart type of charts using dimple.js by using a variable. I want for instance to switch from bars to lines. I've tried with no success, it seems simple however! Any idea? Below is my code : <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Test</title> <script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script> <script type="text/javascript" src="http://dimplejs.org/dist/dimple.v2.1.0.min.js"></script> </head> <body>

How to draw a vertical line with dimple?

橙三吉。 提交于 2019-12-12 02:55:16
问题 Following the example in this link , I would like to draw a vertical line on my chart. The problem is, when I try to create a vertical line (on the same date), instead of obtaining the line, dimple adds my 2 values and draws a point, like in this example: fiddle var dim = {"width": 590,"height": 450}; //chart container width var data = [{"date": "01-02-2010", "cost": "11.415679194952766"}, {"date": "01-03-2010", "cost": "10.81875691467018"}, {"date": "01-04-2010", "cost": "12.710197879070897"