These steps improve situation:
1. UniChart.LayoutConfig.BodyPadding := 0; (from 10)
2. For UniPieSeries.SeriesLabel.Display='inside' i recommend using:
config.innerPadding=10;
config.insetPadding=-10;
3. For UniPieSeries.SeriesLabel.Display='outer' and 'rotate' i recommend using:
config.innerPadding=10;
config.insetPadding=30; // or more (depending on labels length)
4. And finally we need a way to reduce calloutLine.length somehow to minimize unused space around diagram.
Dirty source hack:
function TUniCustomSeriesLabel.AsString(AFieldName: string): string;
begin
if (AFieldName<>'') and (AFieldName[1]<>'[') then
AFieldName := '"' + AFieldName + '"';
Result :=
'{'+
'field:'+AFieldName+
IfThen(FEnabled and (FDisplay<>'none'),
',display:"'+ FDisplay +'"'+
IfThen(FCalloutLine.FVisible, ',calloutLine:true','')+
',calloutLine: { length: 25 }'+ // <----------------------------------------------------------- 20-30.
IfThen(not FFont.IsDefault, ',font:"'+FFont.ToString(False, False, False, False)+'"','')+
IfThen(not FFont.Color<>clWindowText, ','+FFont.ToColor(True, False),'')+
IfThen(FOrientation<>tloHorizontal, ',orientation:"vertical"','')+
IfThen(FPadding<>20, ',padding:'+IntToStr(FPadding),''),
'')+
'}';
end;
Can i set calloutLine at runtime?
5. Missing labels:
6. And finally:
Can i add units in hint?
These are stored in dataset, but seems like not all DS fields are loaded into Chart, so i cant just use them in JS.