D
deko
When I create a chart (manually or with automation) and define the
xlCategory Axis with 2 columns, the TickLabels appear all scrunched together
and are not readable. The TickLabel text is made up of a date value (from
column A) and a time value (from column B):
"02/27/05 06:47:24"
If I make the chart really wide, both date and time appear horizontal like
this:
02/27/05
06:47:24
But the chart requires a Width of 500 which makes the time portion of the
Ticklabel appear vertical (and readable), but the date portion appears
horizontal and all scrunched together. I've tried changing the
..Axes(xlCategory).TickLabels.Orientation property, but the changes only
apply to the time value (from column B).
Is there a way to get both the date and time to appear vertically so the
entire TickLabel is readable?
Thanks in advance.
Here is the macro code generated when creating the chart manually:
Sub Macro1()
Charts.Add
ActiveChart.ChartType = xlLineMarkersStacked
ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("A1:C22"), _
PlotBy:=xlColumns
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1"
With ActiveChart
.HasAxis(xlCategory, xlPrimary) = True
.HasAxis(xlValue, xlPrimary) = True
End With
ActiveChart.Axes(xlCategory, xlPrimary).CategoryType = xlCategoryScale
ActiveChart.HasLegend = False
ActiveChart.HasDataTable = False
End Sub
xlCategory Axis with 2 columns, the TickLabels appear all scrunched together
and are not readable. The TickLabel text is made up of a date value (from
column A) and a time value (from column B):
"02/27/05 06:47:24"
If I make the chart really wide, both date and time appear horizontal like
this:
02/27/05
06:47:24
But the chart requires a Width of 500 which makes the time portion of the
Ticklabel appear vertical (and readable), but the date portion appears
horizontal and all scrunched together. I've tried changing the
..Axes(xlCategory).TickLabels.Orientation property, but the changes only
apply to the time value (from column B).
Is there a way to get both the date and time to appear vertically so the
entire TickLabel is readable?
Thanks in advance.
Here is the macro code generated when creating the chart manually:
Sub Macro1()
Charts.Add
ActiveChart.ChartType = xlLineMarkersStacked
ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("A1:C22"), _
PlotBy:=xlColumns
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1"
With ActiveChart
.HasAxis(xlCategory, xlPrimary) = True
.HasAxis(xlValue, xlPrimary) = True
End With
ActiveChart.Axes(xlCategory, xlPrimary).CategoryType = xlCategoryScale
ActiveChart.HasLegend = False
ActiveChart.HasDataTable = False
End Sub