Sherzod Posted February 26 Share Posted February 26 @Woutero 21 minutes ago, Sherzod said: Then just set a large number, for example 1000 instead of 50. For example: UniChart.ClientEvent.UniEvents -> function chart.beforeInit(sender, config) { config.series[0].renderer = function(a) { a.attr.maxBarWidth = 1000; a.attr.minGapWidth = 20; a.attr.inGroupGapWidth = 5; return a }; } Quote Link to comment Share on other sites More sharing options...
Woutero Posted February 26 Author Share Posted February 26 11 hours ago, Sherzod said: Okay. Then just set a large number, for example 1000 instead of 50. Sherzod Youre right, simply setting a large number for MaxBarWidth as the default value is the easiest solution! Thanks Quote Link to comment Share on other sites More sharing options...
Woutero Posted March 2 Author Share Posted March 2 Sherzod In another thread you gave the following solution for hiding the legend that appears inside very pie: UniChart ("PieChart")-> ClientEvents -> UniEvents -> function chart.beforeInit: function chart.beforeInit(sender, config) { config.series[0].renderer=function(sprite, config, rendererData, index){ return {label: ""} } } But when I do this, I get an error: Cannot read properties of undefined (reading '0') Is there a way that I can do this via a JSCall()? This is what I need, just the pie chart without the lines and label on the border Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 2 Share Posted March 2 Hello @Woutero Because you're doing it wrong. Quote Link to comment Share on other sites More sharing options...
Woutero Posted March 3 Author Share Posted March 3 Sherzod Thank you, that works! Is there a way that I can do this via a JSCall() so that I can switch between hide/display during runtime? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 3 Share Posted March 3 I will try to check. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 3 Share Posted March 3 4 hours ago, Woutero said: Is there a way that I can do this via a JSCall() so that I can switch between hide/display during runtime? One possible solution: 1. function chart.beforeInit(sender, config) { config.series[0].renderer=function(sprite, config, rendererData, index){ return {label: ""} } } 2. 3. UniChart.ClientEvents.ExtEvents -> function afterrender(sender, eOpts) { sender.chart.series[0].setLabel({display: 'none'}); } 4. Runtime -> procedure TMainForm.UniButton1Click(Sender: TObject); begin UniChart1.JSInterface.JSCall('chart.series[0].setLabel', [UniChart1.JSInterface.JSStatement('{display: "outside"}')]); //none end; Quote Link to comment Share on other sites More sharing options...
Woutero Posted March 4 Author Share Posted March 4 Thanks Sherzod! Quote Link to comment Share on other sites More sharing options...
Kathlyn Posted March 20 Share Posted March 20 Can you explain the typical workflow or process where users might encounter the issue of being unable to assign a new title to streams in a UniChart? Quote Link to comment Share on other sites More sharing options...
Woutero Posted April 6 Author Share Posted April 6 Hi Sherzod How can I display the values within a Bar of a uniBarSeries? I want to display the xxx values, e.g. 35 for bar 1. Quote Link to comment Share on other sites More sharing options...
Woutero Posted April 8 Author Share Posted April 8 Resolved by using SeriesLabel->Enabled = true Quote Link to comment Share on other sites More sharing options...
Woutero Posted April 8 Author Share Posted April 8 Sherzod So I can now display the labels, but I cannot display them horizontally. The same question was asked here: Quote Link to comment Share on other sites More sharing options...
Woutero Posted April 8 Author Share Posted April 8 Resolved by using ThisChart->JSInterface->JSCall("chart.series[0].setLabel",("{orientation: \"horizontal\"}")); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.