Пример #1
0
 /// <summary>
 /// Add a legend with parameters to the chart.
 /// </summary>
 public void AddLegend(ChartLegendPosition position, Boolean overlay)
 {
     if (Legend != null)
         RemoveLegend();
     Legend = new ChartLegend(position, overlay);
     ChartRootXml.Add(Legend.Xml);
 }
Пример #2
0
 internal ChartLegend(ChartLegendPosition position, Boolean overlay)
 {
     Xml = new XElement(
         XName.Get("legend", DocX.c.NamespaceName),
         new XElement(XName.Get("legendPos", DocX.c.NamespaceName), new XAttribute("val", XElementHelpers.GetXmlNameFromEnum <ChartLegendPosition>(position))),
         new XElement(XName.Get("overlay", DocX.c.NamespaceName), new XAttribute("val", GetOverlayValue(overlay)))
         );
 }
Пример #3
0
 /// <summary>
 /// Add a legend with parameters to the chart.
 /// </summary>
 public void AddLegend(ChartLegendPosition position, Boolean overlay)
 {
     if (this.Legend != null)
     {
         this.RemoveLegend();
     }
     this.Legend = new ChartLegend(position, overlay);
     this.ChartRootXml.Element(XName.Get("plotArea", Document.c.NamespaceName)).AddAfterSelf(Legend.Xml);
 }
Пример #4
0
 public void AddLegend(ChartLegendPosition position, bool overlay)
 {
     if (Legend != null)
     {
         RemoveLegend();
     }
     Legend = new ChartLegend(position, overlay);
     ChartRootXml.Element(XName.Get("plotArea", DocX.c.NamespaceName)).AddAfterSelf(Legend.Xml);
 }
Пример #5
0
 /// <summary>
 /// Add a legend with parameters to the chart.
 /// </summary>
 public void AddLegend(ChartLegendPosition position, Boolean overlay)
 {
     if (Legend != null)
     {
         RemoveLegend();
     }
     Legend = new ChartLegend(position, overlay);
     ChartRootXml.Add(Legend.Xml);
 }
 public ActionResult FirstLook(bool? stack, string seriesType, bool? showTitle, bool? showLegend, ChartLegendPosition? legendPosition)
 {
     ViewBag.Stack = stack ?? false;
     ViewBag.SeriesType = seriesType ?? "bar";
     ViewBag.ShowTitle = showTitle ?? true;
     ViewBag.ShowLegend = showLegend ?? true;
     ViewBag.LegendPosition = legendPosition ?? ChartLegendPosition.Bottom;
     return View(SalesDataBuilder.GetCollection());
 }
Пример #7
0
 /// <summary>
 /// Add a legend with parameters to the chart.
 /// </summary>
 public void AddLegend(ChartLegendPosition position, Boolean overlay)
 {
     if (Legend != null)
     {
         RemoveLegend();
     }
     Legend = new ChartLegend(position, overlay);
     //ChartRootXml.Add(Legend.Xml);
     // Sourceman: seems to be necessary to keep track of the order of elements as defined in the schema (Word 2013)
     ChartRootXml.Element(XName.Get("plotArea", DocX.c.NamespaceName)).AddAfterSelf(Legend.Xml);
 }
Пример #8
0
 /// <summary>
 /// Sets the legend position
 /// </summary>
 /// <param name="position">The legend position.</param>
 /// <example>
 /// <code lang="CS">
 /// &lt;% Html.Kendo().Chart()
 ///           .Name("Chart")
 ///           .Legend(legend => legend.Position(ChartLegendPosition.Bottom))
 ///           .Render();
 /// %&gt;
 /// </code>
 /// </example>
 public ChartLegendBuilder Position(ChartLegendPosition position)
 {
     legend.Position = position;
     return(this);
 }
Пример #9
0
 /// <summary>
 /// Sets the legend position
 /// </summary>
 /// <param name="position">The legend position.</param>
 /// <example>
 /// <code lang="CS">
 /// &lt;% Html.Telerik().Chart()
 ///            .Name("Chart")
 ///            .Legend(legend => legend.Position(ChartLegendPosition.Bottom))
 ///            .Render();
 /// %&gt;
 /// </code>
 /// </example>        
 public ChartLegendBuilder Position(ChartLegendPosition position)
 {
     legend.Position = position;
     return this;
 }
Пример #10
0
 internal ChartLegend(ChartLegendPosition position, Boolean overlay)
 {
     Xml = new XElement(
         XName.Get("legend", DocX.c.NamespaceName),
         new XElement(XName.Get("legendPos", DocX.c.NamespaceName), new XAttribute("val", XElementHelpers.GetXmlNameFromEnum<ChartLegendPosition>(position))),
         new XElement(XName.Get("overlay", DocX.c.NamespaceName), new XAttribute("val", GetOverlayValue(overlay)))
         );
 }
Пример #11
0
 /// <summary>
 /// Add a legend with parameters to the chart.
 /// </summary>
 public void AddLegend(ChartLegendPosition position, Boolean overlay)
 {
     if (Legend != null)
         RemoveLegend();
     Legend = new ChartLegend(position, overlay);
     //ChartRootXml.Add(Legend.Xml);
     // Sourceman: seems to be necessary to keep track of the order of elements as defined in the schema (Word 2013)
     ChartRootXml.Element(XName.Get("plotArea", DocX.c.NamespaceName)).AddAfterSelf(Legend.Xml);
 }