Ejemplo n.º 1
0
 /// <summary>
 /// The create chart.
 /// </summary>
 /// <param name="htmlHelper">
 /// The html helper.
 /// </param>
 /// <param name="canvasId">
 /// The canvas id.
 /// </param>
 /// <param name="simpleChart">
 /// The simple chart.
 /// </param>
 /// <returns>
 /// The <see cref="MvcHtmlString"/>.
 /// </returns>
 public static MvcHtmlString CreateChart <TSimpleChartOptions>(this HtmlHelper htmlHelper, string canvasId, SimpleChartBase <TSimpleChartOptions> simpleChart) where TSimpleChartOptions : SimpleChartOptions
 {
     return(CreateChart(canvasId, simpleChart.ChartType.ToString(), simpleChart.Data.ToJson(), simpleChart.ChartConfiguration.ToJson()));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// The create chart.
 /// </summary>
 /// <param name="htmlHelper">
 /// The html helper.
 /// </param>
 /// <param name="canvasId">
 /// The canvas id.
 /// </param>
 /// <param name="simpleChart">
 /// The simple chart.
 /// </param>
 /// <returns>
 /// The <see cref="HtmlString"/>.
 /// </returns>
 public static IHtmlContent CreateChart <TSimpleChartOptions>(this IHtmlHelper htmlHelper, string canvasId, SimpleChartBase <TSimpleChartOptions> simpleChart) where TSimpleChartOptions : SimpleChartOptions
 {
     return(CreateChart(canvasId, simpleChart.ChartType.GetDescription(), simpleChart.GetDataJson(), simpleChart.ChartConfiguration.ToJson()));
 }