charts

c# bind winforms chart to list of objects

假装没事ソ 提交于 2019-12-12 17:24:27
问题 I have a list of objects defined like this: public class ChartData { public int New { get; set; } public int Closed { get; set; } public int Canceled { get; set; } } How can I bind a winforms-chart (bar-chart type) to a List<ChartData> ? I need to have a series for each property in the object (ie, I will have 3 series) and for each point in the chart, I want to see the values for all 3 properties in the object. I managed to programatically add the series (they're visible in the chart), but

F# Make Bar Chart with Winforms DataVisualization

☆樱花仙子☆ 提交于 2019-12-12 17:24:19
问题 I want to make a bar Chart with Winforms and F#. I have seen many other C# examples making a chart with System.Windows.Forms.DataVisualization.Charting although when i try to open that library then it says then namespace is not defined. Something as simple as this let chart = new Chart() doesn't work due to the namespace of the library not being defined i take it. Though I have seen people do this in C#. What is the correct way for F#? Can someone be so kind to show me how to make a chart in

Changing a ChartType from Polar to Radar

走远了吗. 提交于 2019-12-12 17:22:53
问题 I asked in a previous question how to set a specific number of rings and sectors for a polar diagram . I now have a button which changes the chart from polar to radar. The problem is the number of segments changes from 24 (correct) to 25 (wrong). I have no idea why. The code to set the number of rings: #region chartdesign Series s = chartleft.Series[0]; // a reference to the default series ChartArea ca = chartleft.ChartAreas[0]; // a reference to the default chart area Axis ax = ca.AxisX;

Custom Legend in Chart.js 2.1.3

吃可爱长大的小学妹 提交于 2019-12-12 17:14:47
问题 Is there a way to move and manipulate the legend in the Pie chart for Chart.js? Specifically I want to move it to the left or right of my pie chart and have it in a list-style instead of inline. I see in the documentation that the only positions are top or bottom so I tried hiding the default legend with Chart.defaults.global.legend.display = false; And then building my own with document.getElementById('js-legend').innerHTML = myChart.generateLegend(); But this doesn't generate the colored

jqplot donut chart label/legend color and line

不羁岁月 提交于 2019-12-12 17:04:14
问题 I am working with jqplot donut and all seems to be working fine except that I am unable to give color to donut chart value % and a line that should link value % and the chart. I will use screen shots to better explain what my output is what i am trying to achieve This is what my output looks like Using this code var plot1; var storedData; $(document).ready(function () { storedData = [ ['Take home pay', 44228.33], ['Tax', 8771.67], ['Super', 4162.5 ], ['Regular expenses', 0 ], ['Unallocated',

Make a horizontal bar using react-chartjs-2

∥☆過路亽.° 提交于 2019-12-12 16:44:19
问题 I'm struggling to find information to make chart with react-chartjs-2. I made a bar chart using react-chartjs-2. I couldn't find related information about making it horizontal bar. Is it possible to make a horizontal bar with react-chartjs-2? I also have a pie chart next to a bar chart. I use same data from a pie chart to make a bar chart. Any help is appreciated. Here is my code. export default class Categories extends React.Component{ constructor(props){ super(props); this.state = {

Converting bar chart to pie chart in R

自作多情 提交于 2019-12-12 16:05:35
问题 I have following data and code: dd grp categ condition value 1 A X P 2 2 B X P 5 3 A Y P 9 4 B Y P 6 5 A X Q 4 6 B X Q 5 7 A Y Q 8 8 B Y Q 2 > > dput(dd) structure(list(grp = structure(c(1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L), .Label = c("A", "B"), class = "factor"), categ = structure(c(1L, 1L, 2L, 2L, 1L, 1L, 2L, 2L), .Label = c("X", "Y"), class = "factor"), condition = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L), .Label = c("P", "Q"), class = "factor"), value = c(2, 5, 9, 6, 4, 5, 8, 2 )), .Names

Exporting Charts as images in Android

只愿长相守 提交于 2019-12-12 15:28:45
问题 I'm stucked in this for almost a month. I have a perfect chart in my android code using 'afreechart', however, the library does not seem to have support for exporting the chart as an image yet (since it's based on 'jfreechart' and this one does the job). I tried to get the view of the chart, convert it into canvas and save using the compress functions of the bitmap library, however everytime i try this i get a totally black image as a result. I tried this same method and it works for the

Excel - Create chart from range of cells while excluding null values?

佐手、 提交于 2019-12-12 14:37:54
问题 I've got this Excel sheet which basically contains a lot of data. Now, this Excel sheet is updated dynamically via a macro that imports the data. So the data might change, meaning, some cells might be populated, while others won't. So I've got this formula in Sheet 2 in each cell from A2:A60 to M2:M60 which basically looks like this: =IF(Sheet1!E2<>0;Sheet1!A2;"") Meaning, if cell E2 on the row I'm in is 0, then the copied value in the new spreadsheet is nothing. Same goes for the next row:

Charts not plotting in tableViewCell

流过昼夜 提交于 2019-12-12 14:21:15
问题 I am trying to plot a random chart in a tableViewCell in swift 3 using Charts 3.0.2 (an older pod version because I am using Xcode 8.3) setChart() function is working in a view controller class. Here is my TableViewCell Code - import UIKit import Charts class ChartTVC: UITableViewCell { @IBOutlet weak var barChartView: BarChartView! var months: [String]! override func awakeFromNib() { super.awakeFromNib() } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected