Create horizontal stacked bars and line series SharePoint chart

Applies to: Nevron Chart for SharePoint (WSS3.0, SharePoint 2007/2010/2013)

How to create horizontal stacked bars and line series SharePoint Chart?

You can easily create a combined horizontal stacked bars and a line series in a single chart area with the Combo chart type.



The following steps will help you to create this chart:

  1. In the chart designer, select the Combo Chart Type.
  2. From the 2D/3D Effects tab, select 2D Effects Orientation Left to Right.
  3. From the Pivot tab, setup your values and categories. From the Data Groupings - Values - General - Options tab, select the required series type for your chart series (two Bar series and one Line series).
  4. From the Data Groupings - Values - General - Options tab, for the second Bar series, set Group Mode to Stacked:

Use the following code in the Code tab of the Chart designer to modify chart Inflate Margins:

[C#]
using System; 
using System.Drawing; 
using Nevron.GraphicsCore; 
using Nevron.Chart; 
using Nevron.ReportingServices; 
    
namespace MyNamespace 
    /// <summary> 
    /// Sample class 
    /// </summary> 
    public class MyClass 
    
        /// <summary> 
        /// Main entry point 
        /// </summary> 
        /// <param name="context"></param> 
        public static void RSMain(NRSChartCodeContext context) 
        
        //return; 
            NChart chart = context.Document.Charts[0]; 
            chart.Series[0].InflateMargins = false
        
    
}

[VB.NET]
Imports System
Imports System.Drawing
Imports Nevron.GraphicsCore
Imports Nevron.Chart
Imports Nevron.ReportingServices
  
Namespace MyNamespace
    ''' <summary> 
    ''' Sample class 
    ''' </summary> 
    Public Class [MyClass]
        ''' <summary> 
        ''' Main entry point 
        ''' </summary> 
        ''' <param name="context"></param> 
        Public Shared Sub RSMain(context As NRSChartCodeContext)
            'return; 
            Dim chart As NChart = context.Document.Charts(0)
            chart.Series(0).InflateMargins = False
        End Sub
    End Class
End Namespace

Article ID: 114, Created On: 11/5/2010, Modified: 1/29/2013