本文整理汇总了C#中DotNet.Highcharts.Highcharts.SetCredits方法的典型用法代码示例。如果您正苦于以下问题:C# Highcharts.SetCredits方法的具体用法?C# Highcharts.SetCredits怎么用?C# Highcharts.SetCredits使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DotNet.Highcharts.Highcharts
的用法示例。
在下文中一共展示了Highcharts.SetCredits方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ChartOrders
public ActionResult ChartOrders()
{
Highcharts orders = new Highcharts("OrderID");
orders.SetTitle(new Title() { Text = Resources.Resource.OrdersRoma });
orders.SetYAxis(new YAxis
{
Title = new YAxisTitle() { Text = Resources.Resource.CountRoma },
});
//var ord = orderManager.GetQueryableOrders();
var drivers = userManager.GetQueryableDrivers();
//var res = ord.Join(drivers, x => x.DriverId, y => y.Id, (x, y) => new { Name = y.UserName, Orders = 1 }).GroupBy(x=>x.Name).ToList();
List<Series> series = new List<Series>();
List<object> serieData = new List<object>();
/*foreach (var i in res)
{
Series serie = new Series();
serie.Name = i.Key;
serie.Type = ChartTypes.Column;
serieData.Clear();
serieData.Add(i.Count());
serie.Data = new Data(serieData.ToArray());
series.Add(serie);
}*/
orders.SetSeries(series.ToArray());
orders.SetLegend(new Legend()
{
Align = HorizontalAligns.Right,
Layout = Layouts.Vertical,
VerticalAlign = VerticalAligns.Top
});
orders.SetPlotOptions(new PlotOptions()
{
Area = new PlotOptionsArea() { Stacking = Stackings.Normal }
});
orders.SetCredits(new Credits() { Enabled = false });
ViewBag.Order = orders;
return View();
}
示例2: GetAreaChart
private void GetAreaChart()
{
DashboardViewModel dashboard = new DashboardViewModel();
dashboard.ViewModelEvent += dashboard_ViewModelEvent;
// Get statistics
List<Dictionary<string, object>> values = dashboard.GetAreaChart();
if (values != null)
{
Highcharts areaChart = new Highcharts("areaChart");
areaChart.InitChart(new Chart()
{
DefaultSeriesType = ChartTypes.Area,
BackgroundColor = new DotNet.Highcharts.Helpers.BackColorOrGradient(Color.Transparent),
Height = 300
});
areaChart.SetPlotOptions(new PlotOptions()
{
Series = new PlotOptionsSeries()
{
ConnectNulls = true,
ConnectEnds = true
}
});
areaChart.SetLegend(new DotNet.Highcharts.Options.Legend()
{
Align = DotNet.Highcharts.Enums.HorizontalAligns.Center,
Layout = DotNet.Highcharts.Enums.Layouts.Horizontal,
VerticalAlign = DotNet.Highcharts.Enums.VerticalAligns.Bottom,
BorderWidth = 0
});
areaChart.SetCredits(new DotNet.Highcharts.Options.Credits() { Enabled = false });
areaChart.SetTitle(new DotNet.Highcharts.Options.Title() { Text = "" });
YAxis yAxis = new YAxis();
yAxis.Title = new DotNet.Highcharts.Options.YAxisTitle() { Text = "" };
yAxis.Min = 0;
XAxis xAxis = new XAxis();
xAxis.Categories = values[0].Keys.ToArray();
List<Series> seriesCollection = new List<Series>();
Series seriesUsers = new Series();
seriesUsers.Data = new DotNet.Highcharts.Helpers.Data(values[0].Values.ToArray());
seriesUsers.Name = "Users";
seriesCollection.Add(seriesUsers);
Series seriesMailbox = new Series();
seriesMailbox.Data = new DotNet.Highcharts.Helpers.Data(values[1].Values.ToArray());
seriesMailbox.Name = "Mailbox";
seriesCollection.Add(seriesMailbox);
if (StaticSettings.CitrixEnabled)
{
Series seriesCitrix = new Series();
seriesCitrix.Data = new DotNet.Highcharts.Helpers.Data(values[2].Values.ToArray());
seriesCitrix.Name = "Citrix";
seriesCollection.Add(seriesCitrix);
}
areaChart.SetXAxis(xAxis);
areaChart.SetYAxis(yAxis);
areaChart.SetSeries(seriesCollection.ToArray());
litAreaChart.Text = areaChart.ToHtmlString();
}
else
litAreaChart.Text = "Error populating chart.";
}
示例3: DorinTewst
private void DorinTewst()
{
Queue<string> categoriesQueue = new Queue<string>(new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" });
for (int i = 0; i < DateTime.Now.Month; i++)
{
categoriesQueue.Enqueue(categoriesQueue.Dequeue());
}
var categories = categoriesQueue.ToArray();
Highcharts chart = new Highcharts("FuelConsumptionID");
chart.SetTitle(new Title() { Text = Resources.Resource.FuelConsumDorin });
///var list = orderManager.AnnualFuelConsumption();
List<object> obList = new List<object>();
/*foreach (var item in list)
{
var iut = (int)item;
obList.Add((object)iut);
}*/
chart.SetYAxis(new YAxis
{
Title = new YAxisTitle() { Text = Resources.Resource.FuleLDorin },
});
chart.SetXAxis(new XAxis
{
Title = new XAxisTitle() { Text = Resources.Resource.FuleMonthDorin },
Categories = categories
});
List<Series> series = new List<Series>();
Series serie = new Series();
serie.Name = Resources.Resource.LetresDorin;
serie.Type = ChartTypes.Column;
//serie.Data = new Data(serieData.ToArray());
serie.Data = new Data(obList.ToArray());
series.Add(serie);
chart.SetSeries(series.ToArray());
chart.SetLegend(new Legend()
{
Align = HorizontalAligns.Right,
Layout = Layouts.Vertical,
VerticalAlign = VerticalAligns.Top
});
chart.SetPlotOptions(new PlotOptions()
{
Area = new PlotOptionsArea() { Stacking = Stackings.Normal }
});
chart.SetCredits(new Credits() { Enabled = false });
ViewBag.Chart = chart;
}
示例4: DriversIncome
public void DriversIncome()
{
//var DriversInc = orderManager.GetDriversIncome();
Highcharts driversIncomeChart = new Highcharts("driversChartId");
driversIncomeChart.SetTitle(new Title() { Text = Resources.Resource.DriversIncome });
driversIncomeChart.SetXAxis(new XAxis() {
Title = new XAxisTitle() { Text = @Resources.Resource.Drivers },
Categories = new string[] {Resources.Resource.Info}
});
driversIncomeChart.SetYAxis(new YAxis() {
Title = new YAxisTitle() { Text = @Resources.Resource.IncomeUAH }});
List<Series> series = new List<Series>();
List<object> serieData = new List<object>();
Series serie = new Series();
/*foreach (ChartsColumnDTO item in DriversInc)
{
serie = new Series();
serie.Name = item.ColumnName;
serie.Type = ChartTypes.Column;
serieData.Clear();
serieData.Add(new object[] { item.Value });
serie.Data = new Data(serieData.ToArray());
series.Add(serie);
};*/
driversIncomeChart.SetSeries(series.ToArray());
driversIncomeChart.SetLegend(new Legend()
{
Align = HorizontalAligns.Right,
Layout = Layouts.Vertical,
VerticalAlign = VerticalAligns.Top
});
driversIncomeChart.SetPlotOptions(new PlotOptions()
{
Area = new PlotOptionsArea() { Stacking = Stackings.Normal }
});
driversIncomeChart.SetCredits(new Credits() { Enabled = false });
ViewBag.DriversIncomeChart = driversIncomeChart;
}