charts

Pie charts in reactjs

亡梦爱人 提交于 2019-12-22 14:17:16
问题 I'm trying to implement a pie chart in my web application and i found this as a good source. https://github.com/reactjs/react-chartjs But it does not provide the way to give chartData and chartOptions inorder to make it work. How can i do this? my code import React, {Component} from 'react'; var LineChart = require("react-chartjs").Line; class PieChart extends Component { constructor() { super(); } render() { return ( <div className=""> <LineChart data={chartData} options={chartOptions} width

Coloring Cells Google Chart - Scatter Chart

做~自己de王妃 提交于 2019-12-22 13:58:55
问题 I am using google charts in one of my project. I need to color a set of cells in the google scatter chart using the following code. I am using google.visualization.arrayToDataTable for processing data. Following is my code <script src="https://www.gstatic.com/charts/loader.js"></script> <div id="chart_div"></div> <script type="text/javascript"> google.charts.load('current', { callback: function () { var dataTable = new google.visualization.DataTable({ cols: [ {label: 'X', type: 'number'},

Dynamic generation of Bar Charts in Primefaces

房东的猫 提交于 2019-12-22 13:58:51
问题 I am using Primefaces 4.0. I have a requirement to generate Bar charts depending on the number of results of a query.The Title and color of Bar charts should also be able to set dynamically for all using the query results. Example of bar chart as follows:- <p:barChart id="barStats" value="#{Bean.categoryModel}" legendPosition="ne" style="width:300px;height:250px;" title="Break Down(Barchart)" barMargin="10" min="0" barPadding="10" max="40" animate="true" /> In the above example of bar chart

How to create a Google Pie Chart with dynamic data?

大憨熊 提交于 2019-12-22 13:49:30
问题 I'm struggling to get the below google pie chart to reflect dynamic data found within a html table on the same page. <html> <head> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"> </script> <script type="text/javascript"> google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Answer', 'Percentage'], ['Yes', 10], //This static data needs to

dc.js onClick Listener Not Working

让人想犯罪 __ 提交于 2019-12-22 13:30:47
问题 I'm having trouble getting an onClick listener to work with a dc.barChart. According to this thread, clickable charts should have an onClick listener now. However, I've tried both chart.onClick = function and chart.on("click", function) without any luck. Below is the code I've tried to test whether the listener is working or not. var hubChart = dc.barChart("#hub-chart"); var dateHub = dateCF.dimension(function(d){ return d.hub;}), dateHubs = dateHub.group().reduceSum(function(d){ return d

c3 js: How can I group by Year on the X-axis labels?

此生再无相见时 提交于 2019-12-22 13:04:11
问题 Using c3 js library for charts (c3js.org). I'am trying to achieve something similar to this chart (i.e., add year label 2011, 2012, 2013 on a seperate line after Q1, Q2, Q3, Q4) var chart = c3.generate({ data: { x: 'x', columns: [ ['x', '2013-01-01', '2013-01-02', '2013-01-03', '2014-01-04', '2014-01-05', '2014-01-06'], ['data1', 30, 200, 100, 400, 150, 250], ['data2', 130, 340, 200, 500, 250, 350] ] }, axis: { x: { type: 'timeseries', tick: { format: '%Y-%m-%d' } } } }); show's the x axis

c3 js: How can I group by Year on the X-axis labels?

天涯浪子 提交于 2019-12-22 13:03:42
问题 Using c3 js library for charts (c3js.org). I'am trying to achieve something similar to this chart (i.e., add year label 2011, 2012, 2013 on a seperate line after Q1, Q2, Q3, Q4) var chart = c3.generate({ data: { x: 'x', columns: [ ['x', '2013-01-01', '2013-01-02', '2013-01-03', '2014-01-04', '2014-01-05', '2014-01-06'], ['data1', 30, 200, 100, 400, 150, 250], ['data2', 130, 340, 200, 500, 250, 350] ] }, axis: { x: { type: 'timeseries', tick: { format: '%Y-%m-%d' } } } }); show's the x axis

WPF Chart Series Dynamic Databinding

感情迁移 提交于 2019-12-22 12:19:08
问题 How do I go about binding a chart series to a datasource where the data changes? I will of course need the chart series to reflect the changes to the underlying data. I need a fresh angle. 回答1: I think you mean charts from WPF Toolkit. Use ObservableCollection for add/remove events and INotifyPropertyChanged for update events. Xaml: <chart:Chart> <chart:Chart.Series> <chart:LineSeries DependentValuePath="Value" IndependentValuePath="Time" Title="Example" x:Name="lineChart"> <chart:LineSeries

How to adjust chart size to fit page size using Excel VBA?

我是研究僧i 提交于 2019-12-22 12:14:57
问题 I'm trying to adjust the size of a chart in Excel to exactly fit the printable area, e.g. the chart should cover the whole A4 page except the margin area , i.e. it should cover the area of (A4 height - top and bottom margins) x (A4 width - left and right margins) . I have tried the following code but it turned out that the height of the chart is very close to but still not quite the same as (A4 height - top and bottom margins), whereas the width is about 1 cell wider than (A4 width - left and

How to un-select cells in Excel? Using Matlab to create a chart adds graph with value of makred area

安稳与你 提交于 2019-12-22 11:36:10
问题 Excel 2016 remembers the cells you "marked" (selected) last before closing the file and the same asrea will be marked at the next opening of the file. The only way to not mark an area is an untouched file created by for example Matlab. How to unmark all areas in Excel using Matlab? In my program (code below) I access an existing Excel File using Matlab. The code creates a new chart with set range. Unfortunately there are always created more graphs in the chart and selecet in range. To be more