Link to home
Create AccountLog in
Avatar of Wilder1626
Wilder1626Flag for Canada

asked on

VB6 - MSChart1 values inside columns


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?

User generated image
Here is part of the code i have to generate above chart.
  With MSChart1
             '  .ShowLegend = True
            .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

        End With

Open in new window

Avatar of Chris Watson
Chris Watson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Wilder1626


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

Open in new window

Thanks for your help. this is working great.