Page 1 of 1

Fixed Height Issue

Posted: Tue Aug 01, 2006 8:20 pm
by 9641201
In order to print an HTML report on 1 page (landscape), I have fixed the height to 500 pixels. The limit for the x-axis labels is currently 80 characters. It seems when this much data is entered the graph and the x-axis lables overlap.

So far it seems the obvious answer it to reduce the length of the x-axis labels OR don't fix the height. I was wondering if there were any other options to keep this overlapping from occuring.

I'm developing in VS 2003. Here is some code to reproduce. TIA

Dim Bar1 As New Styles.Bar(wcChart.Chart)

'Set the values in the graph
Bar1.Add(4.2, "ABCDEFGHIJKLMNO - ABCDEFGHIJKLMNOPQRSTUVWXYZ1234ABCDEFGHIJKLMN")
Bar1.Add(8.9, "ABCDEFGHIJKLMNO - ABCDEFGHIJKLMNOPQRSTUVWXYZ1234ABCDEFGHIJKLMN")
Bar1.Add(9.9, "ABCDEFGHIJKLMNO - ABCDEFGHIJKLMNOPQRSTUVWXYZ1234ABCDEFGHIJKLMN")
Bar1.Add(6.5, "ABCDEFGHIJKLMNO - ABCDEFGHIJKLMNOPQRSTUVWXYZ1234ABCDEFGHIJKLMN")
Bar1.Add(9.1, "ABCDEFGHIJKLMNO - ABCDEFGHIJKLMNOPQRSTUVWXYZ1234ABCDEFGHIJKLMN")
Bar1.Add(7.4, "ABCDEFGHIJKLMNO - ABCDEFGHIJKLMNOPQRSTUVWXYZ1234ABCDEFGHIJKLMN")
Bar1.Add(5.5, "ABCDEFGHIJKLMNO - ABCDEFGHIJKLMNOPQRSTUVWXYZ1234ABCDEFGHIJKLMN")
Bar1.Add(6.9, "ABCDEFGHIJKLMNO - ABCDEFGHIJKLMNOPQRSTUVWXYZ1234ABCDEFGHIJKLMN")
Bar1.Add(9.3, "ABCDEFGHIJKLMNO - ABCDEFGHIJKLMNOPQRSTUVWXYZ1234ABCDEFGHIJKLMN")
Bar1.Add(8.7, "ABCDEFGHIJKLMNO - ABCDEFGHIJKLMNOPQRSTUVWXYZ1234ABCDEFGHIJKLMN")
Bar1.Add(7.8, "ABCDEFGHIJKLMNO - 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FGHIJKLMNO - ABCDEFGHIJKLMNOPQRSTUVWXYZ1234ABCDEFGHIJKLMN")
Bar1.Add(7.8, "ABCDEFGHIJKLMNO - ABCDEFGHIJKLMNOPQRSTUVWXYZ1234ABCDEFGHIJKLMN")
Bar1.Add(7.9, "ABCDEFGHIJKLMNO - ABCDEFGHIJKLMNOPQRSTUVWXYZ1234ABCDEFGHIJKLMN")
Bar1.Add(7.5, "ABCDEFGHIJKLMNO - ABCDEFGHIJKLMNOPQRSTUVWXYZ1234ABCDEFGHIJKLMN")
Bar1.Add(6.9, "ABCDEFGHIJKLMNO - ABCDEFGHIJKLMNOPQRSTUVWXYZ1234ABCDEFGHIJKLMN")
Bar1.Add(7.7, "ABCDEFGHIJKLMNO - ABCDEFGHIJKLMNOPQRSTUVWXYZ1234ABCDEFGHIJKLMN")


'make the graph pretty
Bar1.ColorEach = True
Bar1.ShowInLegend = False
Bar1.Marks.Style = Bar1.Marks.Style.Value
Bar1.Marks.Visible = True
'Bar1.Marks.Angle = 90
Bar1.Marks.Shadow.Visible = False
Bar1.Marks.Font.Size = 8
wcChart.Chart.Axes.Bottom.Labels.Angle = 90
wcChart.Chart.Axes.Bottom.Labels.Font.Size = 8
wcChart.Chart.Axes.Bottom.Labels.Font.Bold = True
wcChart.Chart.Aspect.View3D = False
'wcChart.Chart.Legend.LegendStyle = LegendStyles.Palette 'LegendStyles.Values 'LegendStyles.Auto 'LegendStyles.Values 'LegendStyles.Series 'LegendStyles.Palette
'wcChart.Chart.Legend.TextStyle = LegendTextStyles.Plain 'LegendTextStyles.Value 'LegendTextStyles.XValue '
wcChart.Chart.Legend.Visible = False
'wcChart.Chart.Legend.Alignment = LegendAlignments.Bottom
wcChart.Chart.Axes.Bottom.Title.Caption = "Workers"
wcChart.Chart.Axes.Left.Title.Caption = "Time (Hours)"
wcChart.BackColor = Color.White 'Color.Transparent
wcChart.ForeColor = Color.White 'Color.Transparent
wcChart.Chart.Panel.Color = Color.White
wcChart.Chart.Header.Text = "Some Title"
wcChart.Height = System.Web.UI.WebControls.Unit.Pixel(500)
wcChart.Width = System.Web.UI.WebControls.Unit.Pixel(875)

Posted: Mon Aug 21, 2006 11:10 am
by narcis
Hi Vinod,

You could try what's told on this thread.