iOS pie chart properties
I´m using Charts for iOS and have a pie chart. I would like to remove the inner circle and change the width for each pie inside the pie chart. I have not been able to find how to decrease the width for the pie chart and remove the inner circle.
The image is what I want to do.
I have tried on my PieChartView
to change the draw
properties but have not succeeded. Any ideas how to solve this?
swift ios-charts
add a comment |
I´m using Charts for iOS and have a pie chart. I would like to remove the inner circle and change the width for each pie inside the pie chart. I have not been able to find how to decrease the width for the pie chart and remove the inner circle.
The image is what I want to do.
I have tried on my PieChartView
to change the draw
properties but have not succeeded. Any ideas how to solve this?
swift ios-charts
add a comment |
I´m using Charts for iOS and have a pie chart. I would like to remove the inner circle and change the width for each pie inside the pie chart. I have not been able to find how to decrease the width for the pie chart and remove the inner circle.
The image is what I want to do.
I have tried on my PieChartView
to change the draw
properties but have not succeeded. Any ideas how to solve this?
swift ios-charts
I´m using Charts for iOS and have a pie chart. I would like to remove the inner circle and change the width for each pie inside the pie chart. I have not been able to find how to decrease the width for the pie chart and remove the inner circle.
The image is what I want to do.
I have tried on my PieChartView
to change the draw
properties but have not succeeded. Any ideas how to solve this?
swift ios-charts
swift ios-charts
edited Nov 12 '18 at 16:34
kit
1,1063716
1,1063716
asked Oct 22 '16 at 8:42
John DoeJohn Doe
11
11
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
PieChartView
has the following properties:
holeRadiusPercent
transparentCircleRadiusPercent
Set them both to 0.0
and you should achieve what you want.
You can also hide the hole explicitly by setting chartView.drawHoleEnabled = false
If you need more properties, just open the source code. It is heavily commented.
add a comment |
Adding to @sulthan's response with some example code.
The CGSize of the chart view's frame can be modified to affect the chart width itself.
However, a CGSize which exceeds the CGSize of the chart's parent view may result in unpredictable layouts.
let chart = PieChartView( frame: self.view.frame)
// setup data...etc.
// style
chart.holeRadiusPercent = 0
chart.transparentCircleColor = UIColor.clear
// increase width
// width in excess of the parentView.size.width will cause layout issues
chart.frame.size = CGSize(width: 500, height: chart.frame.size.height)
Shameless plug: Learn more about iOS Pie charts at ioscharts.io/piechart
The website was very helpful!
– Aditya Garg
Dec 10 '16 at 6:58
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f40190089%2fios-pie-chart-properties%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
PieChartView
has the following properties:
holeRadiusPercent
transparentCircleRadiusPercent
Set them both to 0.0
and you should achieve what you want.
You can also hide the hole explicitly by setting chartView.drawHoleEnabled = false
If you need more properties, just open the source code. It is heavily commented.
add a comment |
PieChartView
has the following properties:
holeRadiusPercent
transparentCircleRadiusPercent
Set them both to 0.0
and you should achieve what you want.
You can also hide the hole explicitly by setting chartView.drawHoleEnabled = false
If you need more properties, just open the source code. It is heavily commented.
add a comment |
PieChartView
has the following properties:
holeRadiusPercent
transparentCircleRadiusPercent
Set them both to 0.0
and you should achieve what you want.
You can also hide the hole explicitly by setting chartView.drawHoleEnabled = false
If you need more properties, just open the source code. It is heavily commented.
PieChartView
has the following properties:
holeRadiusPercent
transparentCircleRadiusPercent
Set them both to 0.0
and you should achieve what you want.
You can also hide the hole explicitly by setting chartView.drawHoleEnabled = false
If you need more properties, just open the source code. It is heavily commented.
edited Nov 12 '18 at 14:41
answered Oct 22 '16 at 13:52
SulthanSulthan
94.8k16154197
94.8k16154197
add a comment |
add a comment |
Adding to @sulthan's response with some example code.
The CGSize of the chart view's frame can be modified to affect the chart width itself.
However, a CGSize which exceeds the CGSize of the chart's parent view may result in unpredictable layouts.
let chart = PieChartView( frame: self.view.frame)
// setup data...etc.
// style
chart.holeRadiusPercent = 0
chart.transparentCircleColor = UIColor.clear
// increase width
// width in excess of the parentView.size.width will cause layout issues
chart.frame.size = CGSize(width: 500, height: chart.frame.size.height)
Shameless plug: Learn more about iOS Pie charts at ioscharts.io/piechart
The website was very helpful!
– Aditya Garg
Dec 10 '16 at 6:58
add a comment |
Adding to @sulthan's response with some example code.
The CGSize of the chart view's frame can be modified to affect the chart width itself.
However, a CGSize which exceeds the CGSize of the chart's parent view may result in unpredictable layouts.
let chart = PieChartView( frame: self.view.frame)
// setup data...etc.
// style
chart.holeRadiusPercent = 0
chart.transparentCircleColor = UIColor.clear
// increase width
// width in excess of the parentView.size.width will cause layout issues
chart.frame.size = CGSize(width: 500, height: chart.frame.size.height)
Shameless plug: Learn more about iOS Pie charts at ioscharts.io/piechart
The website was very helpful!
– Aditya Garg
Dec 10 '16 at 6:58
add a comment |
Adding to @sulthan's response with some example code.
The CGSize of the chart view's frame can be modified to affect the chart width itself.
However, a CGSize which exceeds the CGSize of the chart's parent view may result in unpredictable layouts.
let chart = PieChartView( frame: self.view.frame)
// setup data...etc.
// style
chart.holeRadiusPercent = 0
chart.transparentCircleColor = UIColor.clear
// increase width
// width in excess of the parentView.size.width will cause layout issues
chart.frame.size = CGSize(width: 500, height: chart.frame.size.height)
Shameless plug: Learn more about iOS Pie charts at ioscharts.io/piechart
Adding to @sulthan's response with some example code.
The CGSize of the chart view's frame can be modified to affect the chart width itself.
However, a CGSize which exceeds the CGSize of the chart's parent view may result in unpredictable layouts.
let chart = PieChartView( frame: self.view.frame)
// setup data...etc.
// style
chart.holeRadiusPercent = 0
chart.transparentCircleColor = UIColor.clear
// increase width
// width in excess of the parentView.size.width will cause layout issues
chart.frame.size = CGSize(width: 500, height: chart.frame.size.height)
Shameless plug: Learn more about iOS Pie charts at ioscharts.io/piechart
answered Dec 3 '16 at 23:12
AlexAlex
250315
250315
The website was very helpful!
– Aditya Garg
Dec 10 '16 at 6:58
add a comment |
The website was very helpful!
– Aditya Garg
Dec 10 '16 at 6:58
The website was very helpful!
– Aditya Garg
Dec 10 '16 at 6:58
The website was very helpful!
– Aditya Garg
Dec 10 '16 at 6:58
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f40190089%2fios-pie-chart-properties%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown