This function will place a label along the X-Axis of a chart.  It works with charts that have the X-Axis in its normal location below the plot lower boundary area, or along the left side of the chart when the NewYX function's optional parameter "Vertical" option is applied.



Custom labels are located at the chart's tick-marks, and they are passed to this function using a BPV String series.  String series can be auto-indexed, or manually sized and manually indexed, but both indexing types of series must be passed using the AsSeries function.


Label names are created as part of the chart's creation code.  Their placement on the chart and the space between each label is handled by the logic used to create the label names that the script places into the elements of the series.  Space between label when there are lot of data points along the X-Axis is required to prevent the placement of subsequent labels from covering the previous label because the tick marks where the labels are place are too close together.


Label can be applied the chart's X-Axis when it is in its standard position below the chart's plotting area, or when tje X-Axis is rotated.  When the X-Axis is rotated, the labels will be placed near the tick-mark just outside of the chart's left vertical plotting boundary area.



chart.SetxAxisLabels( AsSeries(LabelSeries), LabelCount)





A BPV String Series.



Use with all BPV Numeric or String series that are passed to any Chart parameter.

AsSeries(...) function conditions the series so the chart function will be able to use the information contained within each of the series elements.


The number of labels contained in the BPV String series.



'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
'  Establish Contour map image size
iChartWidth = 600   '  X-Axis Width
iChartHeight = 300   '  Y-Axis Height
'  Create graphing space for a bar chart wide,
'  tall with chart title "vertical" option creates
'  horizontal bars.
chart.NewXY( "Vertical Bars", iChartWidth, iChartHeight, "" )
'chart.NewXY( "Horizontal Rotated Axis Bars", _
'              iChartWidth, iChartHeight, "Vertical" )
'  Size the Bar Ploting area
chart.SetPlotArea( 10, 40, 60, 70 )
'  Values entered into each parameter location can change the
'  appearance of the layout and 3D depth effect.
chart.AddBarLayer( 3 )
'  Add x-Axis Bar Labels
chart.SetxAxisLabels( AsSeries(LabelSeries), iBarCount)
'  Add 10 element Bar series data "bar1"
chart.AddBarSeries( AsSeries( bar1 ), iBarCount )
'  Add 10 element Bar series data "bar2"
chart.AddBarSeries( AsSeries( bar2 ), iBarCount )
'  Create an image of the contour map named:  contour.png
'  & save that image into the test results folder
chart.Make( test.resultsReportPath + "\" + "HVbars.png" )


VBars_AddBarLayer(3) SetxAxisLabelsStandard-X 1-10-2013 3-43-13 PM

VBars_AddBarLayer(3) SetxAxisLabels Rotated-X 1-10-2013 3-39-36 PM



AddBarLayer, AddBarSeries, AsSeries, Make, NewXY, resultsReportPath

See Also:



Edit Time: 9/25/2017 09:09:54 AM

Topic ID#: 566


Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software