chart

How to add shapes on JavaFX LineChart

匿名 (未验证) 提交于 2019-12-03 07:50:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am going to add some shapes on LineChart . I put LineChart and AnchorPane into the StackPane . I added shapes to AnchorPane by getting x and y coordinates from the chart series. Here is example. LineChartApp.java package shapes; import javafx.application.Application; import javafx.scene.Scene; import javafx.stage.Stage; public class LineChartApp extends Application { @Override public void start(Stage primaryStage) throws Exception { primaryStage.setScene(new Scene(new ChartContent())); primaryStage.setMaximized(true); primaryStage.show();

Apache POI: cloning worksheets containing charts

匿名 (未验证) 提交于 2019-12-03 07:50:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: According to numerous sources, for example Limitations section on official page , probably the only good way to work with excel charts from POI is using Excel file with existing chart as a template and modify source cells used by chart. And it works great. The problem is that we need to have not only one but multiple (and we don't know how many at compile time) worksheets with the same chart but different (dynamically generated) data. Using cloneSheet(sheetNumber) is a way to duplicate a template worksheet. But if works fine only until

WPF Toolkit Chart Unordered LineSeries

匿名 (未验证) 提交于 2019-12-03 07:50:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: The default LineSeries implementation orders data points by independed value. This gives me strange results for data like this: Is it possible to plot a line series where lines are drawn between the points in the original order? 回答1: I currently solved this by inheriting from LineSeries: class UnorderedLineSeries : LineSeries { protected override void UpdateShape() { double maximum = ActualDependentRangeAxis.GetPlotAreaCoordinate( ActualDependentRangeAxis.Range.Maximum).Value; Func<DataPoint, Point> PointCreator = dataPoint => new Point(

JIT104 Building IT Systems

白昼怎懂夜的黑 提交于 2019-12-03 07:38:22
JIT104 Building IT Systems Fall, 2019 CRICOS 00213J Page 1 Take-Home Task 1: Bubble Charts (Weight: 20%. Due: Friday 18 October 2019) Overview This is the take home task is worth 20% of your final grade for this unit. Motivation One of the most basic functions of any IT system is to process a given data set to produce some form of human-readable output. This task requires you to produce a visual image based on data stored in a list. It tests your abilities to: • Iterate through sequences of data values; • Perform arithmetic operations; • Display information in a visual form; and • Produce

BizCharts使用采坑教程

一个人想着一个人 提交于 2019-12-03 04:53:47
了不起的BizCharts 最近项目的管理后台都在用阿里粑粑开源的管理框架 Ant Design Pro ,说真话,还是比较好用的。该框架内部也封装了一些图标插件,但是在最近的一个项目中发现,这些图标可定制性还是差了点,不能满足客户需求。 好在它的后面也介绍了自己亲生的BizChart可视化图表组件,因为定制性比较高,但是api中的介绍又不是每个都有例子,更没有组合使用的例子,经过度娘介绍,发现这片文章备受我青睐,我怕作者哪天不高兴放弃了,所以转存了一份,顺便把自己实践到的补充到后面。 原文 作为一个前端打字员,除了绿茶婊之外,最讨厌的就是图表:一个让我伤心,一个让我难过;比这更讨厌的就是文档写得不清不楚的图表库(大概率是九年义务教育期间没有学好语文),让我又爱又恨!所以本篇博文会比较枯燥,只简单描述一下使用BizCharts的过程,当然,重要的是总结遇到的坑(遵从一个坑不踩两次,一个女生不泡两次原则)。 By the way,提到BizCharts,让我们感谢一下阿里巴巴:其开源了这个好用的(虽然偶尔不那么好用,还偶得挺经常的)的react图表库供大家使用,对使用react技术栈的前端打字员来说简直就是福音。本文不会有过多的api解释,具体的接口可以看官网文档鬼门关。 正经篇幅 刚开始,视觉设计师哄我说:“我的要求并不高,待我从前一样好”,啊呸,说错了,“我的要求是

三大图表库:ECharts 、 BizCharts 和 G2,该如何选择?

孤者浪人 提交于 2019-12-03 04:46:36
最近阿里正式开源的BizCharts图表库基于React技术栈,各个图表项皆采用了组件的形式,贴近React的使用特点。同时BizCharts基于G2进行封装,Bizcharts也继承了G2相关特性。公司目前统一使用的是ECharts图表库,下文将对3种图表库进行分析比对。 BizCharts 文档地址: BizCharts 一、安装 通过 npm/yarn 引入 npm install bizcharts --save yarn add bizcharts --save 二、引用 成功安装完成之后,即可使用 import 或 require 进行引用。 例子: import { Chart, Geom, Axis, Tooltip, Legend } from 'bizcharts'; import chartConfig from './assets/js/chartConfig'; <div className="App"> <Chart width={600} height={400} data={chartConfig.chartData} scale={chartConfig.cols}> <Axis name="genre" title={chartConfig.title}/> <Axis name="sold" title={chartConfig.title}/

Apache POI set Excel chart title

匿名 (未验证) 提交于 2019-12-03 03:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm creating an Excel workbook from scratch. One of the sheets contains a chart, and I want to set the chart title. Apache POI has a setChartTitle method on HSSFChart, but neither XSSFChart nor the format-agnostic Chart have methods to set the chart title. Since I need to create .xlsx files this is a problem for me. After much poking around in POI code and OOXML specifications I managed to come up with this code for setting the title on a newly created Chart: if (chart instanceof XSSFChart) { XSSFChart xchart = (XSSFChart) chart; CTChart

How do I create a pie chart using Bokeh?

匿名 (未验证) 提交于 2019-12-03 03:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: All I'd like to do is create a pie chart. The Bokeh documentation covers a number of sophisticated charts, including a donut chart, but it doesn't seem to cover pie chart. Is there any example of this? Ultimately, the chart will need to be to be embedded in a webpage, so I'll need to take advantage of Bokeh's html embed capabilities. 回答1: An example for Bokeh 0.8.1 using the bokeh.plotting interface: from bokeh.plotting import * from numpy import pi # define starts/ends for wedges from percentages of a circle percents = [0, 0.3, 0.4, 0.6, 0

How to display pie chart data values of each slice in chart.js

匿名 (未验证) 提交于 2019-12-03 03:05:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using Chart.js for drawing pie chart in my php page.I found tooltip as showing each slice values. But I wish to display those values like below image. I do not know how to do this with chart.js. Please help me. My Javascript code: function drawPie(canvasId,data,legend){ var ctx = $("#pie-canvas-" + canvasId).get(0).getContext("2d"); var piedata = []; $.each(data,function(i,val){ piedata.push({value:val.count,color:val.color,label:val.status}); }); var options = { tooltipTemplate: "%", } var pie = new Chart(ctx).Pie(piedata,options); if

JavaFX real-time LineChart with time axis

匿名 (未验证) 提交于 2019-12-03 03:05:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to plot real-time graph, with time axis, but I have found the LineChart constructor only has the signature. LineChart(Axis<X> xAxis, Axis<Y> yAxis) I think embedding jfree chart in javafx is not a proper solution. I want a few of the jfree features in a javafx LineChart , is this possible? 回答1: Download Ensemble sample from http://www.oracle.com/technetwork/java/javafx/samples/index.html There are several examples in it for dynamic charts, e.g. "Advanced Stock Line Chart". You can take a look at their source code directly in the