razerdp / animatedpieview Goto Github PK
View Code? Open in Web Editor NEW// 一个好吃的甜甜圈?
License: Apache License 2.0
// 一个好吃的甜甜圈?
License: Apache License 2.0
Hello, is it possible to add a List to the addData and generate for every element in the list a Simple Pie Info?
Kotlin implementaion
Greetings
This is indeed a great library. I would like to request setting icons for every IPieInfo
optionally. Ideally, it could accept a drawable or a vector. Apps supporting <21 must pass a .png while apps where min is 21 can pass a vector. This way the library doesn't have to deal with supporting vectors on older versions.
The icon would be on the side of the label, depending on the positioning and as the label the color should be the same than in the chart.
Thanks for the awesome work :)
hi
is it possible show multiline in TextView of drawText?
@razerdp
I want to write text inside slice of pie, show how to do that?
在横线下方的文字和横线有重叠
Currently there is no option to show legends below the chart as per my research. Can you tell how can I achieve that ? I didnt find in any of your example also.
有概率个别数据出现,当焦点在缺处时它又会出现。
线的长度固定,不根据内容变化怎么操作?
线的长度固定,不根据内容变化怎么操作?
线的长度固定,不根据内容变化怎么操作?
如题,需求是将饼图设成图片背景的,而非纯色的,不过感觉会比较复杂
在条目多于3条的时候,当其中一个占比超过3/4的时候,会有一个条目没有被绘制
When I add even number of data values in config e.g 2, 4, 6, The pie is unable to click on the 2nd data block. It is not animated on click, and the click event isn't detected even in the SelectListener(). The problem doesn't arise when adding odd numbers of values such as 3,5,7.
Create a pieview with all default config, add even numbers of data blocks using addData (i.e calling addData even number of times). Issue will arise when unable to click on 2nd data block. Now try adding only odd number of data (i.e calling addData odd number of times). And everything runs fine.
No error messege, only unable to detect clicks when clicked on 2nd Data block (2nd value added in config)
How to set color in PieChart. I don't know what I am doing wrong.
Following is my code.
AnimatedPieView mAnimatedPieView = (AnimatedPieView) findViewById(R.id.chart);
AnimatedPieViewConfig mConfig = mAnimatedPieView.getConfig();
IPieInfo iPieInfo= new IPieInfo() {
@OverRide
public float getValue() {
return 50;
}
@Override
public int getColor() {
return R.color.green;
}
@Override
public String getDesc() {
return "Bitcoin";
}
};
mConfig.addData(new SimplePieInfo(iPieInfo.getValue(), iPieInfo.getColor(),iPieInfo.getDesc()))
.setDuration(2000)
.setConfig(mConfig);
mAnimatedPieView.start();
1.2.5版本运行,
1、 如果有2个数据,并且有一个大于3/4,会有一个数据会闪一下
2、如果3个数据以上,并且有一个大于3/4,第一个数据会不显示
我降级到1.2.0版本就没这个问题了
另外我使用的是fragment
AnimatedPieViewConfig config = new AnimatedPieViewConfig();
config.addData(new SimplePieInfo(3, getColor(R.color.bg_color4)));
config.addData(new SimplePieInfo(1, getColor(R.color.bg_color5)));
config.addData(new SimplePieInfo(83, getColor(R.color.bg_color34)));
config.splitAngle(1);
config.duration(1200);
pieChartView.applyConfig(config).start();
AnimatedPieViewConfig config = new AnimatedPieViewConfig();
config.addData(new SimplePieInfo(2, getColor(R.color.bg_color4)));
config.addData(new SimplePieInfo(43, getColor(R.color.bg_color5)));
config.splitAngle(1);
config.duration(1200);
pieChartView.applyConfig(config).start();
如题
I've been looking on available methods and there's no way to change typeface. I also checked on library files to see if theres something I can override to change font. No fortune.
Any tips?
Right now the only way to select PieInfo is to tap on the chart itself. Can you invoke the selectListener by tapping label text and/or icon?
sometime the piechart automatically disappeared from the view and then comes automatically back. This scenario keeps take place frequently. Notably, my AnimatePieView is surrounded by a cardview.
I want the pie chart to highlight its corresponding item when the legend is clicked
We are planning to refactor this library in the near future. We will adapt to AndroidX and fix some previous bugs. We very much hope to get your suggestions and let us improve this library.
Please provide your comments under this issue.
由于添加的数据差异过大,导致有些比例不是很大的部分无法显示出来
比如插入了四条数据,在华为荣耀4X 上第二条数据显示的是白色。具体插入的数据
.addData(new SimplePieInfo(0, getColor("FF446767")), true)
.addData(new SimplePieInfo(50f, getColor("ff2bbc80")), true)
.addData(new SimplePieInfo(1641f, getColor("FFbb76b4")), true)
.addData(new SimplePieInfo(109f, getColor("FFFFD28C"),"长文字test"), false)
部分比例相对来说会小
config
.addData(new SimplePieInfo(50.9184314356136125, getColor("FFFFD28C"), "长文字test"), false)
.addData(new SimplePieInfo(0.11943538617599236, getColor("FF446767")), true)
.addData(new SimplePieInfo(0.11780274681129415, getColor("FFFFD28C")), true)
.addData(new SimplePieInfo(0.722165651192247, getColor("FFbb76b4")), true)
.addData(new SimplePieInfo(0.6028910840057398, getColor("ff2bbc80")), true)
.addData(new SimplePieInfo(0.1249620647212785, getColor("ff8be8ff")), true)
.addData(new SimplePieInfo(0.158853315195452116, getColor("fffa734d")), true)
.addData(new SimplePieInfo(0.6632297717331086, getColor("ff957de0")), true)
.addData(new SimplePieInfo(0.8226830459369171, getColor("FF446767")), true)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.