Function must be used with the AddBarLayer function and it must only be executed after the AddBarLayer has executed.  


When used this function can change the shape of the bar, and optionally it can the gap between bars, and as an additional option it can change the space between bar groups.



A Gap is the space between each bar value of the same series.  Subgap spacing is the distance between the bars of different series, which is also of a different color.  For multi-bar layers (bar layers using the Side data combine method, or for stacked bar layers with multiple data groups),  Gap refers to the portion of the space between bar groups, while SubGap refers to the portion of the space between bars within the same bar group.



chart.SetBarGapShape( [Shape], [Gap], [Subgap] )





Bar Shape Elements by Number

Enter #:

Shape Description:


Square shape


Diamond shape


Triangle pointing up


Triangle pointing right


Triangle pointing left


Triangle pointing down




Sets the gap between the bars in a bar chart layer.


Gap between the bars is expressed as the portion of the space between the bars. For example, a bar gap of 0.2 means 20% of the distance between two adjacent bars is the gap between the bars.


The portion of the space between the bars, or between bar groups for multi-bar layers,  uses a default bar gap = 0.2 or 20%


This argument only applies to multi-bar charts. It is the portion of the space between the bars in a bar group.  Gap uses the same decimal process to represent the size of the Subgap spacing between groups



  '  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  '  CREATE a Column / Vertical Bar Chart
  '  Create graphing space for a horizontal chart 300-Pixel wide,
  '  & 200-Pixels tall with chart title: "Vertical Columns"
  chart.NewXY( "Line Chart", 300, 200 )


  '  Size Plotting Area to these values
  chart.SetPlotArea( 10, 35, 60, 30 )

  '  Use Side-by-Side Bar/Column display
  chart.AddBarLayer( 3 )  
  '  Add 5 element values to represent "bar1"

  chart.AddBarSeries( AsSeries( bar1 ), 5 )

  '  Add 5 element values to represent "bar2"
  chart.AddBarSeries( AsSeries( bar2 ), 5 )

  '  Create & Save an image of the chart with
  '  this file name.  BackSlash Character is Required

  '  when using ResultsReportPath  
  chart.Make( Test.ResultsReportPath + "\" + "vbar.png" )


This Image is a collection of column chart images showing the various shapes.  It also shows the Gap and Subgap locations where their size changes the bar spacing:

Click to enlarge, Click to reduce

Bar Shapes & Gap Space References



AddBarLayer, AddBarSeries, AsSeries, Make, NewXY, ResultsReportPath, SetPlotArea

See Also:



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

Topic ID#: 534


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