I am working on graphics, and I need the label for the axis on my chart to be the only vertical line of text when rendering my chart. I don't care if some text is turned off, but I need it to trim gracefully.
I use the WebChart library provided by Carlos Ag and pass the System.Drawing.StringFormat object to the chart.
objChartText = New WebChart.ChartText objChartText.Font = New Font("Verdana", 8, FontStyle.Regular, GraphicsUnit.Point) Dim objStringFormat As StringFormat = New StringFormat(StringFormatFlags.DirectionVertical) objStringFormat.LineAlignment = StringAlignment.Center objStringFormat.Alignment = StringAlignment.Center objStringFormat.Trimming = StringTrimming.Word objChartText.StringFormat = objStringFormat
"StringformatFlags.DirectionVerticle" is an enumeration that defines a position. I am wondering if there is another known non-enum value that I can pass, which will give me the desired result. None of the defined enums gives me what I want. I tried just adding enums, I want 2 (DirectionVertical) and 4096 (nowrap), but this leaves separate characters with a wide spacing below the graph.
Any suggestions?
source share