Bug(?): PieChart exploding slices together when grouped

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
NoName
Newbie
Newbie
Posts: 34
Joined: Fri Nov 15, 2002 12:00 am
Location: Italy

Bug(?): PieChart exploding slices together when grouped

Post by NoName » Tue Dec 02, 2003 1:47 pm

Notice: what you are going to read is really weird. But really really weird!
So, give it attention only if you don't have anything more important to do...

I'm using Delphi 6 Update Pack 2, with TeeChartPro v6.01
I have a PieSeries chart, with 33 (manual) values. All values are positive.
I grouped slices when below 1%, ok.

:!: Now... if I drag a slice... then other slices are dragged, too!! :!:

But please, don't alarm: I tried to reproduce the bug using a new form, putting a TChart component, setting values and grouping slice: everything works fine.
But the chart that I'm working on my "production" project, still has the bug.
So, I exported the chart, and imported it in my brand new test application: TA-DAAA! :roll: the bug is reproduced!

Well, my conclusion is that bug shows because other variables or settings. If you want to try, here is the text object code.

1) From Delphi, create a new form, and go into Text mode ("View as text" by right-click on the form)

2) Just before the last "end", paste the following:

Code: Select all

  object Chart1: TChart
    Left = 0
    Top = 0
    Width = 385
    Height = 327
    AllowPanning = pmNone
    BackImageMode = pbmTile
    BackWall.Gradient.EndColor = clGray
    BackWall.Gradient.Visible = True
    BackWall.Size = 6
    BackWall.Transparent = False
    BottomWall.Size = 6
    Gradient.Direction = gdRadial
    Gradient.EndColor = 13160660
    LeftWall.Size = 6
    Legend.Alignment = laTop
    Legend.ColorWidth = 15
    Legend.Font.Charset = ANSI_CHARSET
    Legend.Font.Name = 'Tahoma'
    Legend.Gradient.Direction = gdTopBottom
    Legend.Gradient.StartColor = 13684944
    Legend.Gradient.Visible = True
    Legend.Inverted = True
    Legend.Shadow.HorizSize = 2
    Legend.Shadow.VertSize = 2
    Legend.ShapeStyle = fosRoundRectangle
    Legend.Symbol.DefaultPen = False
    Legend.Symbol.Width = 15
    Legend.Symbol.WidthUnits = lcsPixels
    Legend.TopPos = 0
    Legend.Transparency = 30
    Legend.Visible = False
    PrintProportional = False
    RightWall.Size = 6
    Title.Font.Charset = ANSI_CHARSET
    Title.Font.Color = 11141120
    Title.Font.Height = -13
    Title.Font.Name = 'Tahoma'
    Title.Font.Style = [fsBold]
    Title.Font.Gradient.Outline = True
    Title.Text.Strings = (
      'Pie Chart Test')
    Chart3DPercent = 19
    View3DOptions.Elevation = 315
    View3DOptions.Orthogonal = False
    View3DOptions.Perspective = 0
    View3DOptions.Rotation = 360
    View3DOptions.ZoomText = False
    Zoom.Allow = False
    Zoom.Brush.Style = bsSolid
    Zoom.Pen.Color = clGray
    Color = 14278369
    TabOrder = 0
    PrintMargins = (
      7
      9
      7
      9)
    object Series1: TPieSeries
      Marks.Arrow.Color = clBlack
      Marks.Arrow.EndStyle = esFlat
      Marks.Arrow.Visible = False
      Marks.ArrowLength = -30
      Marks.Callout.Brush.Color = clBlack
      Marks.Callout.Arrow.Color = clBlack
      Marks.Callout.Arrow.EndStyle = esFlat
      Marks.Callout.Arrow.Visible = False
      Marks.Callout.Distance = 15
      Marks.Callout.Length = -30
      Marks.Font.Gradient.StartColor = 4194368
      Marks.Frame.Visible = False
      Marks.Gradient.Direction = gdTopBottom
      Marks.Gradient.EndColor = 15269887
      Marks.Gradient.StartColor = 12648447
      Marks.Gradient.Visible = True
      Marks.ShapeStyle = fosRoundRectangle
      Marks.Style = smsLabelPercent
      Marks.Visible = False
      SeriesColor = clRed
      Title = 'Portafoglio'
      Circled = True
      OtherSlice.Legend.Visible = False
      OtherSlice.Text = 'Altro'
      OtherSlice.Value = 1
      PiePen.Visible = False
      PieValues.Name = 'Pie'
      PieValues.Order = loAscending
      RotationAngle = 90
      Data = {
        04210000000000000000C05740034F4E45295C8FC2F58061400354574FB81E85
        EB510865400554485245455C8FC2F5289C6B4004464F555267666666663E6F40
        04464956453333333333636F4003534958AE47E17A140A704005534556454E85
        EB51B81E857040054549474854CDCCCCCCCC647240044E494E45295C8FC2F5BC
        73400354454E85EB51B81E85774006454C4556454ECDCCCCCCCC9C7940065457
        454C56450000000000CC794008544849525445454E0000000000207A4008464F
        55525445454E3E0AD7A3709D7C40074649465445454E0000000000D47C400753
        49585445454EF6285C8FC2397D4009534556454E5445454E0000000000387F40
        08454947485445454E5C8FC2F5281C8340084E494E455445454E000000000028
        8340065457454E5459CDCCCCCCCC408340095457454E54594F4E456766666666
        9A8740095457454E545954574F0000000000A087400B5457454E545954485245
        459A99999999C988400A5457454E5459464F555285EB51B81E4189400A545745
        4E5459464956459A99999999D19040095457454E54595349580000000000F893
        400B5457454E5459534556454E0000000000AC94400B5457454E545945494748
        548FC2F528DCBDA7400A5457454E54594E494E455C8FC2F52878AE4006544849
        52545915AE47E17AC6B340095448495254594F4E4548E17A14EE18B440095448
        4952545954574F000000000064B9400B5448495254595448524545}
    end
  end
3) Right click anywhere in the text, and choose "View as Form" to return to design mode.

4) Add a TeeCommander to the form, set its Panel property to Chart1.

5) Run the application. Click the "Edit" button on the TeeCommander.

6) Set to group slices below 1 %

7) Drag the bigger light-green slice (located on the right-bottom)...
:!: WOOW :!: There are SIX slices moving! COOL!! :o

Well... I can't understant where the problem is, since I tried to insert values manually, on a brand new chart, grouping slices... but everything works fine.
I also tried to copy only the "Data" part, on a brand new PieChart, and everything works, only the light-green slice is moving.
But if you try with the above chart, the bug shows.

Regards

NoName
Newbie
Newbie
Posts: 34
Joined: Fri Nov 15, 2002 12:00 am
Location: Italy

Post by NoName » Tue Dec 02, 2003 2:44 pm

:twisted: CLUE! :twisted:

I found the guilty property!

Code: Select all

      PieValues.Order = loAscending
If you remove this line, everything works fine.
Now question is: WHY :?:
Regards

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Dec 12, 2003 4:09 pm

This seems to be a bug, I've added it on our defect list and a fix for it will be considered to inclusion for the next releases.

Josep Lluis Jorge
http://support.steema.com

Post Reply