Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > how to refresh values in mschart control....PLZ HELP!!!


Reply
 
Thread Tools Display Modes
  #1  
Old 04-15-2008, 06:50 AM
dee2020 dee2020 is offline
Newcomer
 
Join Date: Apr 2008
Posts: 1
Default how to refresh values in mschart control....PLZ HELP!!!


Hello

I have a module that consist of Ms Chart show out all five month sales amount. Then I can show out the chart either in 2D bar or Pie chart. The problem is each time eg the first time I show the Pie chart, the amount of % of each slice is shown correctly. Then I change to 2D Bar and it also shows the amount correctly but when I change back to view pie chart, the amount of % of each slice is NOT SHOWN( its gone).

The coding that I used to show the data label is as below

Code:
With MSChart

blnChartType = graphType(0).Value

Select Case blnChartType

Case "True":
.chartType = VtChChartType2dPie ' Pie Chart
.ChartData = arrData
.Visible = True ' Making MSChart visible

For intA = 1 To .Plot.SeriesCollection.Count
With.Plot.SeriesCollection(intA).DataPoints.Item(-1).DataPointLabel
.LocationType = VtChLabelLocationTypeOutside
.Component = VtChLabelComponentPercent
.PercentFormat = "0%"
.VtFont.Size = 10 ' Setting Font Size to 10
End With

Next intA


Case "False":
.chartType = VtChChartType2dBar ' Bar Chart
.ChartData = arrData
.Visible = True ' Making MSChart visible


For intA = 1 To .Plot.SeriesCollection.Count

With.Plot.SeriesCollection(intA).DataPoints.Item(-1).DataPointLabel
.LocationType = VtChLabelLocationTypeAbovePoint
.Component = VtChLabelComponentValue
.VtFont.Size = 10 ' Setting Font Size to 10
End With

Next intA
End Select

End With
THANK YOU VERY MUCH IN ADVANCE
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->