c3.js

Using d3.js to modify c3.js chart

穿精又带淫゛_ 提交于 2019-12-02 17:02:28
问题 I am using C3.js to create charts. I have created a simple donut chart. Here is the screen shot: When I hover over the different donut slices/pieces they expand. Here is a screen shot of that happening: I was wondering if it is possible to have certain donut pieces expand like that by DEFAULT without hovering over them. Here is my FIDDLE I was also suggested to add the following code to make the donut pieces stick out: setTimeout( function() { d3.selectAll('.c3-arc-D, .c3-arc-B, .c3-arc-C')

Using d3.js to modify c3.js chart

走远了吗. 提交于 2019-12-02 11:31:43
I am using C3.js to create charts. I have created a simple donut chart. Here is the screen shot: When I hover over the different donut slices/pieces they expand. Here is a screen shot of that happening: I was wondering if it is possible to have certain donut pieces expand like that by DEFAULT without hovering over them. Here is my FIDDLE I was also suggested to add the following code to make the donut pieces stick out: setTimeout( function() { d3.selectAll('.c3-arc-D, .c3-arc-B, .c3-arc-C').attr("transform", "scale(1.1)"); }, 5); However this makes the chart messy and the circle is not

How to override the dragging events in C3.js

守給你的承諾、 提交于 2019-12-02 10:59:34
问题 I am currently trying to implement a zooming feature that is slightly different from the one that already exists. Actually, I would like that if a user clicks and drags on the graph it zooms on the so defined domain. I would like to do it that way because with the mouse wheel it prevents the user from the page up/down. As it doesn't seem to be possible with the C3.js API , I tried to implement the drag event by following this little walkthrough on D3.js Drag Behaviour. However, I didn't

How to override the dragging events in C3.js

大城市里の小女人 提交于 2019-12-02 06:53:51
I am currently trying to implement a zooming feature that is slightly different from the one that already exists. Actually, I would like that if a user clicks and drags on the graph it zooms on the so defined domain. I would like to do it that way because with the mouse wheel it prevents the user from the page up/down. As it doesn't seem to be possible with the C3.js API , I tried to implement the drag event by following this little walkthrough on D3.js Drag Behaviour . However, I didn't understand it well as it is not working when I try it on the graph. Here's a sample of my code : function

c3js › Timeseries x values not evenly spaced

人盡茶涼 提交于 2019-12-01 15:43:14
I am having an issue with the labels assigned to the values of my graph. The graph is a timeseries. I add values using the 'columns' property of c3js. I use pure timestamps (in seconds) and then convert them into strings using the label.format. However, this is what happens: https://drive.google.com/file/d/0B9GDftIYQFIVb2Z3N2JfS2pzVjg/view?usp=sharing as you can notice the space is not evenly distributed, between 18-21, 25-28 October and 1-4, 4-7 November just two days while all others have three days between the dates. What is causing this? I would like to have evenly spaces gaps (same number

c3js › Timeseries x values not evenly spaced

爱⌒轻易说出口 提交于 2019-12-01 15:23:39
问题 I am having an issue with the labels assigned to the values of my graph. The graph is a timeseries. I add values using the 'columns' property of c3js. I use pure timestamps (in seconds) and then convert them into strings using the label.format. However, this is what happens: https://drive.google.com/file/d/0B9GDftIYQFIVb2Z3N2JfS2pzVjg/view?usp=sharing as you can notice the space is not evenly distributed, between 18-21, 25-28 October and 1-4, 4-7 November just two days while all others have

C3.js - How to specify the timestamp format when plotting timeseries taken from InfluxDB

ぃ、小莉子 提交于 2019-12-01 14:32:41
问题 influxDB timestamps look like this: 2015-01-29T21:55:43.702900257Z The question is what options should I use for the x-axis when I generate the graph with C3.js The error I get: "Failed to parse x '2015-01-29T21:55:43.702900257Z' to Date object" Maybe this jsfiddle will help you do some quick tests... I think the problem is with the time format but any other suggestions are welcome: axis: { x: { type: 'timeseries', tick: { format: '%Y-%m-%d' } } } 回答1: First, I had to add xFormat because as

C3/D3 pie legend format / label overlap

混江龙づ霸主 提交于 2019-12-01 13:51:34
I have a piechart using C3. I have changed the default legend names by adding values and percentages and now. I am looking for a way to format this legend nicely so that the values and percentages are positioned like columns. Is there a way to prevent the labels from overlapping? This is how far I got so far: var columns = ['data11', 'data2', 'data347', 'data40098']; var data = [150, 250, 300, 50]; var colors = ['#0065A3', '#767670', '#D73648', '#7FB2CE', '#00345B']; var padding = 5; var legendData = []; var sumTotal = 0 //prepare pie data var columnData = []; var columnNames = {}; for (i = 0;

C3.js exclude columns from CSV

巧了我就是萌 提交于 2019-12-01 09:34:37
I am creating a multiple series line graph with C3.JS by loading the data from a provided CSV file. I can plot the graph however I have not found yet if it is possible to only plot certain columns from the CSV, my graph is plotting all the CSV columns. My CSV look like this: Sex,Age,L,M,S,P3,P5,P10,P25,P50,P75,P90,P95,P97 2,0,-1.298749689,34.7115617,0.046905108,31.93019666,32.25089861,32.75948527,33.65186554,34.7115617,35.85124044,36.9534983,37.65137722,38.12110271 2,0.5,-1.440271514,36.03453876,0.042999604,33.38070525,33.68743507,34.17345861,35.02508397,36.03453876,37.11806755,38.16405088,38

C3.js exclude columns from CSV

你说的曾经没有我的故事 提交于 2019-12-01 06:15:44
问题 I am creating a multiple series line graph with C3.JS by loading the data from a provided CSV file. I can plot the graph however I have not found yet if it is possible to only plot certain columns from the CSV, my graph is plotting all the CSV columns. My CSV look like this: Sex,Age,L,M,S,P3,P5,P10,P25,P50,P75,P90,P95,P97 2,0,-1.298749689,34.7115617,0.046905108,31.93019666,32.25089861,32.75948527,33.65186554,34.7115617,35.85124044,36.9534983,37.65137722,38.12110271 2,0.5,-1.440271514,36