chillon Posted April 10, 2007 Report Share Posted April 10, 2007 hi, I have a question about multi series labeling in a line chart. the labels for the axis_xare numbers instead of the string read from the dataset This onlyhappens for multi series ........single series is ok.Please let me know how i can rectify this. Thanks! Link to comment Share on other sites More sharing options...
chillon Posted April 12, 2007 Author Report Share Posted April 12, 2007 I'm using ChartFX CS 5.1 for Delphi 6. IN THE MAIN FUNCTION /* yvaluesABS : array[1..128] of double; */ /* sitenames : array[1..15] of string; */ /* CfxData: CfxDataArray; */ //assign values to yvaluesABS and sitenames //.... CfxData := CfxDataArray.Create(); for i := 0 to 14 do begin for j := 0 to 127 do yvaluesABS[j] := /* assign values to yvaluesABS */; CfxData.AddArray(yvaluesABS); ChartP.Series.Legend := sitenames; end; ChartP.Title[CHART_TOPTIT] := '....'; ChartP.Axis[axis_y].ForceZero := false; ChartP.Axis[axis_y].AutoScale := true; ChartP.Axis[axis_x].STEP := 0; ChartP.GetExternalData(CfxData.InterfacePtr,0); AND THEN IN A CLICK EVENT TO CHANGE LABELS OF CHARTP: /* itv_bandname : array[1..128] of string; */ //assign values to itv_bandname //... for f:= 0 to 127 do ChartP.Axis[AXIS_X].Label_[f] := itv_bandname[f]; thanks! Link to comment Share on other sites More sharing options...
chillon Posted April 26, 2007 Author Report Share Posted April 26, 2007 any help? Link to comment Share on other sites More sharing options...
Sascha Posted May 2, 2007 Report Share Posted May 2, 2007 hi chillon, try this: chart1.AxisX.LabelsFormat.Format := AxisFormat_Date; or this: Chart1.AxisX.LabelsFormat.CustomFormat = 'MMM/yy' Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.