Hi,
I am trying to apply grayscale to a bar graph. My code based on a previous discussion in this forum, but it seems something is wrong.
Dim Plotpalette As Steema.TeeChart.Styles.PaletteStyles = PaletteStyles.GrayScale
Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(tChartPreview.Chart, Plotpalette)
For Me.i = 0 To tChartPreview.Series.Count - 1
tChartPreview(i).Color = Plotpalette(i)
Next
I would appreciate any help to change the color palette to grayscale for a bar graph.
Oli
Bars in Grayscale
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Bars in Grayscale
Hi Oli,
Code snippet below works fine for me here using latest TeeChart .NET 2012 release.
Code snippet below works fine for me here using latest TeeChart .NET 2012 release.
Code: Select all
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Dim bar1 As New Steema.TeeChart.Styles.Bar(TChart1.Chart)
bar1.FillSampleValues()
bar1.ColorEach = True
Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(TChart1.Chart, Steema.TeeChart.Themes.Theme.GrayscalePalette)
End Sub
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Bars in Grayscale
Thanks Narcis, your code works fine...my code was faulty.
Oli
Oli