User (Legacy) Posted October 8, 2001 Report Share Posted October 8, 2001 I am trying to create two-line labels for a data/time combination. I approach this by providing a routine for the GetAxisLabel Event and putting the string together with a vbCrLf, as follows: Private Sub ChartFX_GetAxisLabel(index As Integer, ByVal nAxis As Integer, nRes As Integer) If nAxis = AXIS_X Then Dim x() As String x = Split(ChartFX(index).HText, ";") ChartFX(index).HText = x(1) + vbCrLf + x(0) nRes = 1 End If I create a starting string by specifying the axis format property as "Xd MMM yy;HH:mm tt" The result is not what I am looking for, some null characters show up in the text, which is still a single line. I would like to get something like 11:33 PM 2 Oct 01 possibly centered below the tick mark. Any chances? Henk Borsje hjborsje@alert-systems.com Link to comment Share on other sites More sharing options...
Software FX Posted October 10, 2001 Report Share Posted October 10, 2001 You can add CR+LF to the labels itself there in no need of capturing the GetAxisLabel event you must however, set the Axis style to ChartFX1.Axis(AXIS_X).Style = Chart1.Axis(AXIS_X).Style and Not AS_SINGLELINE For example: ChartFX1.Axis(AXIS_X).Style = ChartFX1.Axis(AXIS_X).Style And Not AS_SINGLELINE ChartFX1.Legend(0) = "Line 1" + vbCrLf + "Line 2" CR + LF can also be used in the GetAxisLabel event, but still the style of the axis must have the AS_SINGLELINE flag OFF. -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
IT Support Posted May 24, 2012 Report Share Posted May 24, 2012 Hi We are using ChartFX Client Server 5.1 (Version: 5.0.10.3) together with Active Reports. Until now I was convinced that it is not possible to have multiline Axis-Labels, but now I found this post. Unfortunately it doesn't work in my Report: chart1.Axis(AXIS_X).Style = chart1.Axis(AXIS_X).Style and not AS_SINGLELINEchart1.Axis(AXIS_X).Label(iRow) = DATEPART("m",DateVorjahr) & vbcrlf & RIGHT(DATEPART("yyyy",DateVorjahr),2) the linefeed is ignored and the two strings are glued together. I look forward to your answer! Regards,Luzia Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.