VB6 - MSChart1 values inside columns

Hi,

I would like to add the Label of each columns inside each columns instead of above? also i would like to have it with orientation 90 degrees. Is it also possible to have the text color in White inside the blue columns?

How can i do that?

Chart sample
Here is part of the code i have to generate above chart.
  With MSChart1
             '  .ShowLegend = True
            .EditCopy
            .EditPaste
            .ChartType = VtChChartType2dBar
            Set .DataSource = RS
            For i = 1 To .Column
                .Plot.SeriesCollection(i).DataPoints(-1).marker.Visible = False
                .Plot.SeriesCollection(i).DataPoints(-1).DataPointLabel.LocationType = VtChLabelLocationTypeAbovePoint
            Next

        End With

Open in new window

LVL 11
Wilder1626Asked:
Who is Participating?
 
Chris WatsonConnect With a Mentor Software DeveloperCommented:
Try this?

With MSChart1
	'  .ShowLegend = True
	.EditCopy
	.EditPaste
	.ChartType = VtChChartType2dBar
	Set .DataSource = RS
	For i = 1 To .Column
		.Plot.SeriesCollection(i).DataPoints(-1).marker.Visible = False
		.Plot.SeriesCollection(i).DataPoints(-1).DataPointLabel.LocationType = VtChLabelLocationTypeBelowPoint
		.Plot.SeriesCollection(i).DataPoints(-1).DataPointLabel.VtFont.VtColor.Set 255, 255, 255
	Next
End With

Open in new window

0
 
Wilder1626Author Commented:
This looks pretty good. The only thing left would be to have it orientation 90 degrees. Is that possible?
0
 
Chris WatsonSoftware DeveloperCommented:
It probably is, but I wasn't able to find anything to demonstrate how to achieve it.
0
 
Wilder1626Author Commented:
I found it
.Plot.SeriesCollection(i).DataPoints(-1).DataPointLabel.TextLayout.Orientation = VtOrientationUp

Open in new window

1
 
Wilder1626Author Commented:
Thanks for your help. this is working great.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.