rgreat Posted July 4, 2019 Share Posted July 4, 2019 Why image is clipped? How to fix it? Link to comment Share on other sites More sharing options...
Sherzod Posted July 5, 2019 Share Posted July 5, 2019 9 hours ago, rgreat said: Why image is clipped? How to fix it? Hi, Can you try this config? function chart.beforeInit function chart.beforeInit(sender, config) { config.innerPadding=10; } 1 Link to comment Share on other sites More sharing options...
rgreat Posted July 5, 2019 Author Share Posted July 5, 2019 Thank you, it works. Why not set it by default? Link to comment Share on other sites More sharing options...
Sherzod Posted July 5, 2019 Share Posted July 5, 2019 Thank you. Can you please open a ticket in support portal? Link to comment Share on other sites More sharing options...
rgreat Posted July 5, 2019 Author Share Posted July 5, 2019 On 7/5/2019 at 9:10 PM, Sherzod said: Thank you. Can you please open a ticket in support portal? On the other hand this solution is far from perfect. It adds very large unused borders around diagram. Also seems like amount of text labels is not optimal, and quite low. Only 2 labels on screenshot above. It could be at least 3: 1.19 not shown unless selected. It is possible to remove or tune-up text filtering? Link to comment Share on other sites More sharing options...
rgreat Posted July 5, 2019 Author Share Posted July 5, 2019 One more example: With tweak: Both does not look very good. first: unnecessary clipping. second: diagram is too small. Link to comment Share on other sites More sharing options...
rgreat Posted July 5, 2019 Author Share Posted July 5, 2019 Playing now with insetPadding, Will update when achieve good results. Link to comment Share on other sites More sharing options...
rgreat Posted July 8, 2019 Author Share Posted July 8, 2019 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. 1 Link to comment Share on other sites More sharing options...
Sherzod Posted July 12, 2019 Share Posted July 12, 2019 On 7/9/2019 at 12:15 AM, rgreat said: Can i add units in hint? This post may help you: http://forums.unigui.com/index.php?/topic/10666-tooltip-on-chart/ Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now