chart

Python, Excel, and Charts using win32com

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Python and MS Excel question - using win32com, I'm able to create a chart within Excel but i'm unable to move it within a worksheet. I've found code online to generate the chart: import win32com.client from win32com.client import constants as c xl = win32com.client.gencache.EnsureDispatch('Excel.Application') xl.Visible = True wb = xl.Workbooks.Add() ws = xl.ActiveSheet ws.Range('A1').FormulaR1C1 = 'X' ws.Range('B1').FormulaR1C1 = 'Y' ws.Range('A2').FormulaR1C1 = 1 ws.Range('A3').FormulaR1C1 = 2 ws.Range('A4').FormulaR1C1 = 3 ws.Range('B2')

Chart.js - draw horizontal line

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I would like to draw a horizontal line in a chart using Chart.js . But I'm not able to do it. I've read this question - - but I can't transform the code for drawing horizontal lines not vertical. I hope you can help me (especially potatopeelings :)). 回答1: Here is the jquery code to draw a horizontal line. var data = { labels: ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"], datasets: [{ data: [12, 3, 2, 1, 8, 8, 2, 2, 3, 5, 7, 1] }] }; var ctx = document.getElementById("LineWithLine").getContext("2d");

ReactJS componentDidMount + render

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am currently using react to create d3 visualizations. I'm a little confused about the relationship between the render and componenetDidMount methods (is methods the proper term?). Here is what I have (I excluded some code for simplicity): var Chart = React.createClass({ componentDidMount: function () { var el = this.getDOMNode(); console.log(el); d3Chart.create(el, { width: '500', height: '300' }, this.getChartState(),this.getAccessState); }, render: function () { return ( <div className="row pushdown"> <div className="d3-block"> <div

Redraw/Resize highcharts when printing website

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When I'm printing the bottom right frame the text some text is partly covered by the highcharts because they don't resize before printing. Is there a solution to configure a printing layout with @media print for the website and force highcharts to redraw/resize to container size when website is printed? HTML <script src="http://code.highcharts.com/highcharts.js"></script> <script src="http://code.highcharts.com/modules/exporting.js"></script> <div id="container" style="height: 400px"></div> <div id="container" style="height: 400px"></div>

VBA: Extracting the RGB value of lines in a chart with default colors

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Problem I would like to know how to read the current RGB value of an automatically assigned color in a chart, even if this entails freezing the colors to their current values (rather than updating them as the theme is changed, series are reordered, etc.) Usecase My actual usecase is that I would like to make the datalabels match the color of the lines/markers in a line chart. This is easy if I have explicitly set the colors of the series via a scheme or explicit RGB values, e.g. ' assuming ColorFormat.Type = msoColorTypeRGB s.DataLabels

How can I draw dotted line using chartjs?

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I would like to draw dotted line using chartjs. I did not see any options in creating dotted lines. I feel we need to extend the chartjs to support this. Can some one help me in this? 回答1: In Chart.js 2.1+ , use the borderDash option within your dataset. It takes an array of two numbers. See this codepen 回答2: Drawing a Dotted Line You don't need to extend the chart, but it would be cleaner to do it that way. Preview Script Chart.types.Line.extend({ name: "LineAlt", initialize: function () { Chart.types.Line.prototype.initialize.apply(this,

How to set chart bar&#039;s width?

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using Visual Studio 2010 to write a Winforms application in C#. I'm using the chart control from the regular toolbox to view data from my SQL database. As you see, the bar is very wide. Is there some property or way to make it smaller, and fixed? 回答1: I did a small example binding three values and set the PixelPointWidth of dataPointCustomProperties . int[] liste = new int[] { 1, 2, 3 };//, 4, 5, 6, 7 }; chart1.Series["Series1"].Points.DataBind(liste, "sampleData", "count", "Tooltip=count"); // dataPointCustomProperties chart1.Series[

Embedding a matplotlib chart into Qt/C++ application

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am developing an math-oriented GUI application in Qt/C++ and would like to embed a Python scripting, including NumPy and Matplotlib. Using Python C API, I finally managed to run a script, retrieve the values from the Python variables, including NumPy arrays etc. But I failed at drawing Matplotlib charts into my Qt/C++ application. It is better to say, I have managed to save the chart's RGBA buffer to a variable using Python script, then get the value of the variable as a PyObject of buffer type, get the buffer and transform it to QImage

What is difference between AmCharts.makeChart and new AmCharts.AmSerialChart();

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Some AmCharts demos use AmCharts.makeChart Other AmCharts demos use new AmCharts.AmSerialChart(); What is the difference in these two approaches? 回答1: Using AmCharts.AmSerialChart() you have to instantiate all your components (graphs, axes, ...), add properties to those objects and then assign them to the chart. This is a very inefficient way to create a chart, and, as you can see in the documentation (your 2nd link reference), deprecated. Since its version 3 AmCharts supports the new chart constructor, where you can specify all properties

Column chart with primary and secondary y-axes

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My problem seems simple, I just want to make a column chart with 2 y-axes. When I do this, Excel automatically puts the columns overlapping. I do not want them overlapped! How do I go about correcting this? An image of what is happening: 回答1: You could achieve the chart as shown below with some rather careful manipulation: Basically is requires spacing out your data as shown in columns A:C but also right-aligning the horizontal axis labels, adjusting the secondary axis maximum (and format of both vertical axes, if necessary) and the Gap