charts

How to put rounded corners on a Chart.js Bar chart

巧了我就是萌 提交于 2019-12-17 09:59:20
问题 I have created a bar chart in chart.js using the below code. However I want to give the bars rounded corners instead of edged ones at the top of the bars. I can't find any way to do this using the global settings of chart.js. Is there any way to achieve the effect I want? var barContext = document.getElementById("canvas").getContext("2d"); var barGradientFirst = barContext.createLinearGradient(0, 0, 0, 450); barGradientFirst.addColorStop(0, 'rgba(112,122,157, 0.1)'); barGradientFirst

How to add data table with legend keys to a MS Chart in C#?

陌路散爱 提交于 2019-12-17 07:55:34
问题 There are 2 lists called listversion & MIN_list . Using values of these list I have created a line chart. Everything is work fine. But I am wondering whether it is possible to add a data table with legend keys in to the chart like MS Excel. chart.Series.Clear(); chart.ChartAreas[0].AxisX.Title = "Version"; chart.ChartAreas[0].AxisX.TitleFont = new System.Drawing.Font("Arial", 12, FontStyle.Regular); chart.ChartAreas[0].AxisY.Title = "Time"; chart.ChartAreas[0].AxisY.TitleFont = new System

Constrain aspect ratio in WindowsForms DataVisualization Chart

六眼飞鱼酱① 提交于 2019-12-17 07:54:34
问题 Using the charting control from System.Windows.Forms.DataVisualization.Charting.Chart , I am making a scatter plot. How can I constrain it so that the scale of the X axis is the same as the scale of the Y axis? Simply setting the control itself to be square is insufficient, because it has internal margins for drawing and labeling the axes which are not equal. I could pick a specific size and tweak it to be square, but it needs to be both square and resizable. I've searched high and low in the

Python - Legend overlaps with the pie chart

夙愿已清 提交于 2019-12-17 06:37:24
问题 Using matplotlib in python. The legend overlaps with my pie chart. Tried various options for "loc" such as "best" ,1,2,3... but to no avail. Any Suggestions as to how to either exactly mention the legend position (such as giving padding from the pie chart boundaries) or at least make sure that it does not overlap? 回答1: The short answer is: You may use plt.legend's arguments loc , bbox_to_anchor and additionally bbox_transform and mode , to position the legend in an axes or figure. The long

Click events on Pie Charts in Chart.js

≯℡__Kan透↙ 提交于 2019-12-17 06:27:31
问题 I've got a question regard Chart.js. I've drawn multiple piecharts using the documentation provided. I was wondering if on click of a certain slice of one of the charts, I can make an ajax call depending on the value of that slice? For example, if this is my data var data = [ { value: 300, color:"#F7464A", highlight: "#FF5A5E", label: "Red" }, { value: 50, color: "#46BFBD", highlight: "#5AD3D1", label: "Green" }, { value: 100, color: "#FDB45C", highlight: "#FFC870", label: "Yellow" } ], is it

Plot Pandas DataFrame as Bar and Line on the same one chart

南笙酒味 提交于 2019-12-17 06:12:26
问题 I am trying to plot a chart with the 1st and 2nd columns of data as bars and then a line overlay for the 3rd column of data. I have tried the following code but this creates 2 separate charts but I would like this all on one chart. left_2013 = pd.DataFrame({'month': ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'], '2013_val': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 6]}) right_2014 = pd.DataFrame({'month': ['jan', 'feb'], '2014_val': [4, 5]}) right_2014_target =

How do you create a family tree in d3.js?

时间秒杀一切 提交于 2019-12-17 03:50:47
问题 I'm currently working on a small genealogy experiment and would like to implement a simple family tree like in the picture below. The best search results so far for this only yielded examples where a child can only have a parent node. But what I need is the ability to create links between entities (from father to mother) and links between nodes and other links (from child to the father-mother link). Currently I don't have a fixed data schema for this. I've chosen d3.js for this because it

Java - how to receive point coordinates after mouse button release (JFreeChart)

只谈情不闲聊 提交于 2019-12-17 03:47:32
问题 I wrote a simple parabola plot using JFreeChart. I get graphic point coordinates, when mouse button pressed and i also want to get graphic point coordinates, when mouse button released. But chartMouseMoved don't work while mouse button pressing. How can I solve my problem and get graphic coordinates after mouse button releasing? This is my code: package parabolademo; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.geom.Point2D; import java.awt.geom

Java - how to receive point coordinates after mouse button release (JFreeChart)

心不动则不痛 提交于 2019-12-17 03:47:25
问题 I wrote a simple parabola plot using JFreeChart. I get graphic point coordinates, when mouse button pressed and i also want to get graphic point coordinates, when mouse button released. But chartMouseMoved don't work while mouse button pressing. How can I solve my problem and get graphic coordinates after mouse button releasing? This is my code: package parabolademo; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.geom.Point2D; import java.awt.geom

Java - how to receive point coordinates after mouse button release (JFreeChart)

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-17 03:46:06
问题 I wrote a simple parabola plot using JFreeChart. I get graphic point coordinates, when mouse button pressed and i also want to get graphic point coordinates, when mouse button released. But chartMouseMoved don't work while mouse button pressing. How can I solve my problem and get graphic coordinates after mouse button releasing? This is my code: package parabolademo; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.geom.Point2D; import java.awt.geom