Skip to content

Commit

Permalink
Consider yOffset for PieChart legend (issue #39)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed Apr 23, 2015
1 parent fd3de1d commit 2816bce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Charts/Classes/Renderers/ChartLegendRenderer.swift
Expand Up @@ -283,7 +283,7 @@ public class ChartLegendRenderer: ChartRendererBase
case .PiechartCenter:

var posX = viewPortHandler.chartWidth / 2.0 + (direction == .LeftToRight ? -_legend.textWidthMax / 2.0 : _legend.textWidthMax / 2.0);
var posY = viewPortHandler.chartHeight / 2.0 - _legend.neededHeight / 2.0;
var posY = viewPortHandler.chartHeight / 2.0 - _legend.neededHeight / 2.0 + _legend.yOffset;

for (var i = 0; i < labels.count; i++)
{
Expand Down

0 comments on commit 2816bce

Please sign in to comment.