c3.js

WPF datagrid will only allow user to add 1 row

偶尔善良 提交于 2019-12-13 07:13:55
问题 I have a DataGrid which I initialized with one list item from an ObservableCollection. I would like to allow the user to complete the rest of the datagrid. I have CanUserAddRows=true; I have two textboxes which are enabled/disabled with checkboxes. After filling out the second row, it will not add additional rows unless you double click in one of the cells next to a checkbox(not in the checkbox). It will then put all the number values to 0 and empty any strings and move the current row values

How to use sparse arrays with C3 charts?

你说的曾经没有我的故事 提交于 2019-12-13 03:37:17
问题 For graphing in C3, we can give it column data, which is an array of arrays with each array being a different line on the chart like in this C3 docs example. But is there a way to have that column data sparse? I'm getting an error when I try that, although I'm not sure if there's a workaround I don't know about. If not, is there a better way to convert between sparse and dense arrays than a filter function like what I have? https://jsfiddle.net/dbkidd/majx8byn/ var columnData = [] var entry1

C3.js change label position of Line Chart Y axis to center up of Y axis

℡╲_俬逩灬. 提交于 2019-12-12 20:26:23
问题 I need to change the Y axis's label position upon the Y axis, the current six position options can't meet my scenario, I also tried to customize it with d3 but still without luck. I created a plnkr demo, and also submit an issue in github. var chart = c3.generate({ data: { columns: [ ['data', 30, 200, 100, 400, 150, 250] ] }, axis: { y: { label: { text: 'Y Axis Label', position: 'outer-top' } } } }); Does any one know how to do it? Thanks very much in advance. 回答1: Unlike what you said, you

C3JS bar chart with specific order

跟風遠走 提交于 2019-12-12 07:46:53
问题 If I have a C3JS grouped bar chart defined like the following, how can I get the segments to stay in the order I've defined them instead of in ascending order by value? By default C3 will order them as 5, 10, 40, but I want it to remain as 10, 40, 5. c3.generate({ bindto: '.active-loads', data: { columns: [ ['Picking up future', 10], ['Enroute', 40], ['Delivered', 5] ], type: 'bar', groups: [ ['Picking up future', 'Enroute', 'Delivered'] ], onclick: function(d) { console.debug(d); } }, axis:

Random 500 internal server error loading json data via ajax in Codeigniter project

百般思念 提交于 2019-12-12 05:29:58
问题 I am loading json data that is displayed in graph via AJAX aas implemented by the c3js library (http://c3js.org). The function that site = 'http://example.co.ke/'; var debits_ = c3.generate({ bindto: '#account-debits', data: { x: 'time', xFormat: formart_, type:"area", colors: { credit_type: '#1ABB9C' }, url: site+"dashboard/credits_data/db/"+log_data, mimeType: 'json' }); I am making about 5 to 7 similar requests at the same time. I however get random 500 Internal server error messages.

c3.js generate a stacked bar from JSON payload

余生长醉 提交于 2019-12-12 04:23:29
问题 I am attempting to generate a stacked bar chart with c3 when using a JSON payload (code below). However, when I group the data, instead of having a stacking behavior, they overlay instead. If I use the column structure, I get the intended behavior, but this means that I'd have different code generate for a stacked bar chart versus my other visuals (ie timeseries chart). var chart = c3.generate({ data: { x: "x-axis", json:[ { "x-axis": "0", "data1": 30 }, { "x-axis": "0", "data2": 40 }], keys:

stacked bar chart with overlapping bars C3js

五迷三道 提交于 2019-12-12 03:07:02
问题 Good day. I'm trying to create a bar chart using C3.js that looks like the following: I've tried stacked bar chart, but the problem is that I can't make each bar with different width, and also I can't make them overlap (be in top of each other). Any help in getting to do it like the image above? Thanks UPDATE 1: after trying couple of ideas, I ended up with this: var chart = c3.generate({ data: { columns: [ ['result1', null], ['result2', null], ['data1', -30], ['data2', -130], ['data3', -230]

Multiple Values on x Axes With C3JS ( Timeseries )

こ雲淡風輕ζ 提交于 2019-12-12 00:46:43
问题 I have this nice graph : I also have this array for the blue part ( Area-Spline ). ["x2", "2015-01-05 00:00:00", "2015-01-12 00:00:00", "2015-01-19 00:00:00", "2015-01-26 00:00:00", "2015-02-02 00:00:00", "2015-02-09 00:00:00", "2015-02-16 00:00:00", "2015-02-23 00:00:00", "2015-03-02 00:00:00", "2015-03-09 00:00:00", "2015-03-16 00:00:00", "2015-03-23 00:00:00", "2015-03-30 00:00:00", "2015-04-06 00:00:00", "2015-04-13 00:00:00", "2015-04-20 00:00:00", "2015-04-27 00:00:00", "2015-05-04 00

Sizing custom C3 piechart legend dynamically (using D3?)

梦想与她 提交于 2019-12-11 18:06:13
问题 I have added a custom legend using name, value & ratio to a C3 piechart. Currently a fixed width is used for positioning. Is there a smart way, maybe using D3, to dynamically calculate the pixel widths the legend rows? var columns = ['data11', 'data2', 'data347', 'data40091']; 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 = {};

C3 js : large axis label

我的未来我决定 提交于 2019-12-11 17:52:07
问题 For example: var chart = c3.generate({ data: { x : 'x', columns: [ ['x', 'www.site1.com11111111111111111111111111111111111111111111111111111', 'www.site2.com11111111111111111111111111111111111111111111111111111111', 'www.site3.com11111111111111111111111111111111111111111111111111111111111111', 'www.site4.com11111111111111111111111111111111111111111111111111111111111111111111111111'], ['download', 30, 200, 100, 400], ['loading', 90, 100, 140, 200], ], groups: [ ['download', 'loading'] ], type: