right-align text on bar char

right-align text on bar char

Forum member · May 23, 2007
I have created a .NET class for a horizontal bar chart based on the RandomBarChart class in DynamicPDF_Examples_VS2005. What I want to do is add right-aligned text on the vertical axis for each horizontal bar. The following URL, while not a PDF, gives an idea of what I'm trying to do: http://jeffhowden.com/code/css/forms/ . On that page, the labels in the "Personal Information" section are all right-aligned with the text boxes. Similarly, I want to right-align text to my horizontal bar chart. In Adobe's PDF Reference, I've read about rich text strings (which support a CSS text-align attribute) and BLSE's (which support a TextAlign attribute) but I can't tell whether either of these would work for what I want to do. I should also mention that I'm trying to keep the rendering of the entire bar chart (the horizontal bars and all text) within the .NET class, so I don't think that using Labels is an option (though I could be wrong). Right now I'm writing out text by calling methods like PageWriter.Write_Tj_. Any suggestions for achieving the right-aligned text ? Thanks. Brad

Re: right-align text on bar char

Support · May 24, 2007
Hello Brad, You can add text besides the bar graph and set its alignment to right aligned using either the Label or TextArea page element. Both elements allow you to specify the X and Y coordinate on where to add and also the height and width. Then after adding it, using the Align property set the text alignment to Right align. Thanks, ceTe Software Support Team