Jump to content

UniBar3dSeries customization on runtime


JohnySK

Recommended Posts

Hello,

Is there some way how to change UniBar3dSeries.Brush.MaxBarWidth parameters and some others during runtime?

I am creating the series on runtime. Thx for feedback.

 

rocedure TchartTOP10.CreateSeries;
var
  k: integer;
begin
  with uniChart.SeriesList do
    for k := 0 to (iSeries - 1) do
    begin
      Insert(k, TUniBar3DSeries.Create(uniChart));
      TUniBar3DSeries(Items[k]).Parent := uniChart;
      TUniBar3DSeries(Items[k]).Title := 'Station ' + IntToStr(k);
      TUniBar3DSeries(Items[k]).Stacked := false;
    end;
end;

 

 

image.png.c97dcdebe452f7c1cf0479b22c505565.png

Link to comment
Share on other sites

13 hours ago, JohnySK said:

Is there some way how to change UniBar3dSeries.Brush.MaxBarWidth parameters and some others during runtime?

Hello,

Try this:

..
TUniBarChartBrush(TUniBar3DSeries(Items[k]).Brush).MaxBarWidth := xx;
..

 

  • Thanks 1
Link to comment
Share on other sites

  • 1 year later...

TestCase_chart.zip

Here,

By doing testcase i found that it doesn't work becouse some of my visual editing in clientevent->UniEvents->chart.beforeInit (written by you in another topic).

Can you tell me how can i edit bar width and also have my visual editing ?

 

Link to comment
Share on other sites

5 hours ago, PS1 said:

Can you tell me how can i edit bar width and also have my visual editing ?

Try this approach:

function chart.beforeInit(sender, config)
{
      config.series[0].marker = false;     // "#3498DB",
      
      config.series[0].renderer = function(a) {
          a.attr.maxBarWidth=10;
      };
      
      ...

 

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...