示例#1
0
        /// <summary>
        /// Sets the name of the stack that this series belongs to. Each unique name creates a new stack.
        /// </summary>
        /// <param name="stackType">The stack type.</param>
        /// <param name="stackGroup">The name of the stack group.</param>
        /// <example>
        /// <code lang="CS">
        ///  &lt;%= Html.Kendo().Chart(Model)
        ///             .Name("Chart")
        ///             .Series(series => series.Bar(s => s.Sales).Stack("Female"))
        /// %&gt;
        /// </code>
        /// </example>
        public TSeriesBuilder Stack(ChartStackType stackType, string stackGroup = null)
        {
            Series.StackType = stackType;

            if (stackGroup != null)
            {
                Series.StackGroup = stackGroup;
            }

            return((TSeriesBuilder)this);
        }
示例#2
0
        /// <summary>
        /// Sets a value indicating the type of stacking to use.
        /// </summary>
        /// <param name="type">A value indicating the stacking type.</param>
        /// <example>
        /// <code lang="CS">
        ///  &lt;%= Html.Kendo().Chart(Model)
        ///             .Name("Chart")
        ///             .Series(series => series.Line(s => s.Sales).Stack(ChartStackType.Stack100))
        /// %&gt;
        /// </code>
        /// </example>
        public TSeriesBuilder Stack(ChartStackType type)
        {
            Series.StackType = type;

            return((TSeriesBuilder)this);
        }