ActiveX 2011 Legend Symbol Gradients do not match bar chart

TeeChart for ActiveX, COM and ASP
Post Reply
Wieselberg
Newbie
Newbie
Posts: 14
Joined: Thu Dec 01, 2011 12:00 am

ActiveX 2011 Legend Symbol Gradients do not match bar chart

Post by Wieselberg » Mon Dec 19, 2011 2:46 pm

We recently upgraded from version 7.x to 9.x. Some property defaults have changed apparently. Previously, we had bar charts with gradient bars and the legend symbols for the series were not displayed with a gradient. Now they are always displayed with a gradient, but the gradients in the legend DO NOT match the gradient of the bars. Only a small corner of the symbol matches the bar. The rest of the symbol shows a very light color. I can set my own gradient for the symbol using .Legend.Symbol.Gradient.StartColor, MidColor, EndColor, but that only works if we have only one series because this setting is global to the chart and not specific to the series. If I have multiple series then this setting just affects the center of the symbol. This problem is most obvious with server-side charts rendered as images. With a .Tee file and client-side ActiveX, I did not have this problem with one series. It looked fine. But with multiple series the problem exists even with ActiveX. Our code-base is too large for a simple code example. If it is not clear what the problem is, can you send me a simple bar chart example generating an image file and I'll modify it if needed to demonstrate the problem. I am attaching an image that shows the symbol without any code changes that does not look like the bar series.
Attachments
BarChartSymbol.JPG
BarChartSymbol.JPG (13.27 KiB) Viewed 9333 times

Wieselberg
Newbie
Newbie
Posts: 14
Joined: Thu Dec 01, 2011 12:00 am

Re: ActiveX 2011 Legend Symbol Gradients do not match bar chart

Post by Wieselberg » Tue Dec 20, 2011 7:09 pm

Will I be getting a response to this issue? :evil:

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: ActiveX 2011 Legend Symbol Gradients do not match bar chart

Post by Yeray » Wed Dec 21, 2011 9:36 am

Hi Wieselberg,
Wieselberg wrote:Will I be getting a response to this issue? :evil:
Excuse us for the delayed reply here. Note you can always use the ProSupport option to guarantee a reply within 48 hours during working hours. :P
http://www.steema.com/licensing/support ... ng_support

I'm trying the following code in a VB6 application with v2011.0.0.4. Both the picture and the chart shown in the screen show the correct gradient both in the bars and the legend symbol.
However, I've seen that removing the line where the exportation is done, the chart is repainted one time less and the chart shown in the screen shows a correct gradient in the bars but no gradient at all in the legend symbols. But this is corrected forcing a chart repaint (InternalRepaint)

Code: Select all

Private Sub Form_Load()  
  TChart1.Aspect.View3D = False
  TChart1.Legend.LegendStyle = lsSeries
  
  TChart1.AddSeries scBar
  With TChart1.Series(0)
    .FillSampleValues
    .Marks.Visible = False
    With .asBar
      .BarStyle = bsRectGradient
      .Gradient.Direction = gdDiagonalUp
      .Gradient.StartColor = TChart1.Series(0).Color
    End With
    .Color = RGB(26, 150, 220)
  End With
  
  TChart1.Export.asPNG.SaveToFile "C:\tmp\GradientTest.png"
  'TChart1.Environment.InternalRepaint
End Sub
This looks a little bit different than the problem you've described. Could you please confirm us what exact TeeChart version are you using and, if possible, modify the code above so we can reproduce the problem here?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Wieselberg
Newbie
Newbie
Posts: 14
Joined: Thu Dec 01, 2011 12:00 am

Re: ActiveX 2011 Legend Symbol Gradients do not match bar chart

Post by Wieselberg » Wed Dec 28, 2011 2:23 pm

We upgraded to version 2011.0.0.4 ActiveX. Sorry for the delay. I was away for a few days. I'll try to recreate the issue with your code as well.

Wieselberg
Newbie
Newbie
Posts: 14
Joined: Thu Dec 01, 2011 12:00 am

Re: ActiveX 2011 Legend Symbol Gradients do not match bar chart

Post by Wieselberg » Wed Dec 28, 2011 4:51 pm

It looks like ObjChart.Environment.InternalRepaint resolves this problem if I do it at the very end, before creating the file. Thank you very much for your help!

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: ActiveX 2011 Legend Symbol Gradients do not match bar chart

Post by Yeray » Thu Dec 29, 2011 8:28 am

Hi Wieselberg,

I'm glad to hear it! :D
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply