/// <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())); }
/// <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())); }