Skip to content

Commit 4ceade1

Browse files
committed
Sync with Kendo UI Professional
1 parent 593c8a1 commit 4ceade1

27 files changed

+815
-76
lines changed

docs-aspnet/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ baseurl: /aspnet-core
717717
cdnVersion: "2024.4.1112"
718718

719719
## The themes CDN used
720-
themesCdnVersion: "10.0.0"
720+
themesCdnVersion: "10.0.1"
721721

722722
## The MVC Core version used
723723
mvcCoreVersion: "2024.4.1112"

docs-aspnet/html-helpers/charts/appearance.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,56 @@ As of the R2 2017 SP1 release, the Chart provides styling options through [Sass-
159159
```
160160
{% endif %}
161161

162+
## Using Pattern Fills
163+
164+
In addition to solid colors, the Chart series can also be filled with repeating patterns by using the `Pattern` configuration setting of the series.
165+
166+
> The pattern inherits the series color as main color and accepts an optional `background` color.
167+
168+
The following customizable pattern fills are available:
169+
* Crosshatch
170+
* Diagonal Stripes
171+
* Dots
172+
* Grid
173+
* Vertical Stripes
174+
175+
Below is an example of using pattern fills for series:
176+
177+
```HtmlHelper
178+
@(Html.Kendo().Chart()
179+
.Name("chart")
180+
.Series(series =>
181+
{
182+
series.Bar(new double[] { 117000, 138000 }).Name("Total Visits")
183+
.Pattern(pattern=>pattern.Color("red").Background("blue").Type(ChartSeriesPattern.Dots).Radius(50));
184+
series.Bar(new double[] { 67000, 83000 }).Name("Unique visitors")
185+
.Pattern(pattern=>pattern.Type(ChartSeriesPattern.Crosshatch).Width(25));
186+
})
187+
)
188+
```
189+
{% if site.core %}
190+
```TagHelper
191+
192+
@addTagHelper *, Kendo.Mvc
193+
194+
<kendo-chart name="chart">
195+
<series>
196+
<series-item type="ChartSeriesType.Bar"
197+
name="Total Visits"
198+
data="new double[] { 117000, 138000 }">
199+
<pattern color="red" background="blue" type="ChartSeriesPattern.Dots" radius=50/>
200+
</series-item>
201+
<series-item type="ChartSeriesType.Bar"
202+
name="Unique visitors"
203+
data="new double[] { 67000, 83000 }">
204+
<pattern type="ChartSeriesPattern.Crosshatch" width=25 />
205+
</series-item>
206+
</series>
207+
</kendo-chart>
208+
209+
```
210+
{% endif %}
211+
162212
## Animated Transitions
163213

164214
{{ site.product }} Charts use animated transitions to display new and updated data. To disable these transitions, use the `transitions` option.

docs-aspnet/html-helpers/scheduling/gantt/getting-started-gantt.md

Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ Use the Gantt HtmlHelper {% if site.core %}or TagHelper{% endif %} to add the co
261261

262262
In the `Home` controller, declare the CRUD actions. Use the names of the actions you set in the DataSource and the `DependenciesDataSource` configurations in the previous step.
263263

264+
{% if site.mvc %}
264265
```Controller
265266
public ActionResult Index()
266267
{
@@ -498,6 +499,244 @@ public virtual JsonResult DestroyDependency([DataSourceRequest] DataSourceReques
498499
return Json(new[] { task }.ToDataSourceResult(request, ModelState), JsonRequestBehavior.AllowGet);
499500
}
500501
```
502+
{% else %}
503+
```Controller
504+
public ActionResult Index()
505+
{
506+
ViewBag.Message = "Welcome to ASP.NET Core!";
507+
508+
return View();
509+
}
510+
511+
public virtual JsonResult ReadTasks([DataSourceRequest] DataSourceRequest request)
512+
{
513+
return Json(GetAllTasks().ToDataSourceResult(request));
514+
}
515+
516+
public virtual JsonResult DestroyTask([DataSourceRequest] DataSourceRequest request, TaskViewModel task)
517+
{
518+
if (ModelState.IsValid)
519+
{
520+
var newTasks = GetAllTasks().Where(t => t.TaskID != task.TaskID);
521+
HttpContext.Session.SetObjectAsJson("tasks", newTasks);
522+
}
523+
524+
return Json(new[] { task }.ToDataSourceResult(request, ModelState));
525+
}
526+
527+
public virtual JsonResult CreateTask([DataSourceRequest] DataSourceRequest request, TaskViewModel task)
528+
{
529+
if (ModelState.IsValid)
530+
{
531+
task.TaskID = GetAllTasks().Last().TaskID + 1;
532+
var newTasks = GetAllTasks().ToList();
533+
newTasks.Add(task);
534+
HttpContext.Session.SetObjectAsJson("tasks", newTasks);
535+
}
536+
537+
return Json(new[] { task }.ToDataSourceResult(request, ModelState));
538+
}
539+
540+
public virtual JsonResult UpdateTask([DataSourceRequest] DataSourceRequest request, TaskViewModel task)
541+
{
542+
if (ModelState.IsValid)
543+
{
544+
var newTasks = GetAllTasks().Where(t => t.TaskID != task.TaskID).ToList();
545+
newTasks.Add(task);
546+
HttpContext.Session.SetObjectAsJson("tasks", newTasks);
547+
}
548+
549+
return Json(new[] { task }.ToDataSourceResult(request, ModelState), JsonRequestBehavior.AllowGet);
550+
}
551+
552+
private IEnumerable<TaskViewModel> GetAllTasks()
553+
{
554+
List<TaskViewModel> ganttTasks = new List<TaskViewModel>
555+
{
556+
new TaskViewModel
557+
{
558+
TaskID = 7,
559+
Title = "Software validation, research and implementation",
560+
ParentID = null,
561+
OrderId = 0,
562+
Start = new DateTime(2020, 6, 1, 3, 0, 0),
563+
End = new DateTime(2020, 6, 18, 3, 0, 0),
564+
PlannedStart = new DateTime(2020, 6, 1, 3, 0, 0),
565+
PlannedEnd = new DateTime(2020, 6, 12, 3, 0, 0),
566+
PercentComplete = 0.43M,
567+
Summary = true,
568+
Expanded = true
569+
},
570+
571+
new TaskViewModel
572+
{
573+
TaskID = 18,
574+
Title = "Project Kickoff",
575+
ParentID = 7,
576+
OrderId = 0,
577+
Start = new DateTime(2020, 6, 1, 3, 0, 0),
578+
End = new DateTime(2020, 6, 1, 3, 0, 0),
579+
PlannedStart = new DateTime(2020, 6, 1, 3, 0, 0),
580+
PlannedEnd = new DateTime(2020, 6, 1, 3, 0, 0),
581+
PercentComplete = 0.23M,
582+
Summary = false,
583+
Expanded = true
584+
},
585+
new TaskViewModel
586+
{
587+
TaskID = 13,
588+
Title = "Implementation",
589+
ParentID = 7,
590+
OrderId = 1,
591+
Start = new DateTime(2020, 6, 3, 3, 0, 0),
592+
End = new DateTime(2020, 6, 17, 3, 0, 0),
593+
PlannedStart = new DateTime(2020, 6, 2, 3, 0, 0),
594+
PlannedEnd = new DateTime(2020, 6, 17, 3, 0, 0),
595+
PercentComplete = 0.77M,
596+
Summary = true,
597+
Expanded = true
598+
},
599+
new TaskViewModel
600+
{
601+
TaskID = 100,
602+
Title = "Test",
603+
ParentID = 13,
604+
OrderId = 0,
605+
Start = new DateTime(2020, 6, 4, 3, 0, 0),
606+
End = new DateTime(2020, 6, 5, 1, 0, 0),
607+
PlannedStart = new DateTime(2020, 6, 4, 3, 0, 0),
608+
PlannedEnd = new DateTime(2020, 6, 5, 1, 0, 0),
609+
PercentComplete = 0.3M,
610+
Summary = false,
611+
Expanded = true
612+
},
613+
new TaskViewModel
614+
{
615+
TaskID = 24,
616+
Title = "Prototype",
617+
ParentID = 13,
618+
OrderId = 0,
619+
Start = new DateTime(2020, 6, 3, 3, 0, 0),
620+
End = new DateTime(2020, 6, 5, 3, 0, 0),
621+
PlannedStart = new DateTime(2020, 6, 3, 3, 0, 0),
622+
PlannedEnd = new DateTime(2020, 6, 6, 3, 0, 0),
623+
PercentComplete = 0.77M,
624+
Summary = false,
625+
Expanded = true
626+
},
627+
new TaskViewModel
628+
{
629+
TaskID = 26,
630+
Title = "Architecture",
631+
ParentID = 13,
632+
OrderId = 1,
633+
Start = new DateTime(2020, 6, 5, 3, 0, 0),
634+
End = new DateTime(2020, 6, 7, 3, 0, 0),
635+
PlannedStart = new DateTime(2020, 6, 4, 3, 0, 0),
636+
PlannedEnd = new DateTime(2020, 6, 6, 3, 0, 0),
637+
PercentComplete = 0.82M,
638+
Summary = false,
639+
Expanded = true
640+
},
641+
new TaskViewModel
642+
{
643+
TaskID = 27,
644+
Title = "Data Layer",
645+
ParentID = 13,
646+
OrderId = 2,
647+
Start = new DateTime(2020, 6, 3, 3, 0, 0),
648+
End = new DateTime(2020, 6, 8, 3, 0, 0),
649+
PlannedStart = new DateTime(2020, 6, 2, 3, 0, 0),
650+
PlannedEnd = new DateTime(2020, 6, 8, 3, 0, 0),
651+
PercentComplete = 1.00M,
652+
Summary = false,
653+
Expanded = true
654+
},
655+
new TaskViewModel
656+
{
657+
TaskID = 28,
658+
Title = "Unit Tests",
659+
ParentID = 13,
660+
OrderId = 4,
661+
Start = new DateTime(2020, 6, 9, 3, 0, 0),
662+
End = new DateTime(2020, 6, 11, 3, 0, 0),
663+
PlannedStart = new DateTime(2020, 6, 8, 3, 0, 0),
664+
PlannedEnd = new DateTime(2020, 6, 10, 3, 0, 0),
665+
PercentComplete = 0.68M,
666+
Summary = false,
667+
Expanded = true
668+
},
669+
new TaskViewModel
670+
{
671+
TaskID = 29,
672+
Title = "UI and Interaction",
673+
ParentID = 13,
674+
OrderId = 5,
675+
Start = new DateTime(2020, 6, 5, 3, 0, 0),
676+
End = new DateTime(2020, 6, 9, 3, 0, 0),
677+
PlannedStart = new DateTime(2020, 6, 4, 3, 0, 0),
678+
PlannedEnd = new DateTime(2020, 6, 7, 3, 0, 0),
679+
PercentComplete = 0.60M,
680+
Summary = false,
681+
Expanded = true
682+
},
683+
};
684+
685+
HttpContext.Session.SetObjectAsJson("tasks", ganttTasks);
686+
687+
return ganttTasks;
688+
}
689+
690+
public virtual JsonResult ReadDependencies([DataSourceRequest] DataSourceRequest request)
691+
{
692+
List<DependencyViewModel> dependencies = new List<DependencyViewModel>()
693+
{
694+
new DependencyViewModel() { DependencyID = 1, PredecessorID = 24 , SuccessorID = 26, Type = DependencyType.FinishStart },
695+
new DependencyViewModel() { DependencyID = 2, PredecessorID = 26 , SuccessorID = 27, Type = DependencyType.FinishStart },
696+
697+
};
698+
699+
var result = dependencies.Select(o =>
700+
new {
701+
DependencyID = o.DependencyID,
702+
PredecessorID = o.PredecessorID,
703+
SuccessorID = o.SuccessorID,
704+
Type = (int)o.Type
705+
}).ToList();
706+
return Json(result.ToDataSourceResult(request));
707+
}
708+
709+
public virtual JsonResult CreateDependency([DataSourceRequest] DataSourceRequest request, DependencyViewModel task)
710+
{
711+
if (ModelState.IsValid)
712+
{
713+
// ...
714+
}
715+
716+
return Json(new[] { task }.ToDataSourceResult(request, ModelState));
717+
}
718+
719+
public virtual JsonResult UpdateDependency([DataSourceRequest] DataSourceRequest request, DependencyViewModel task)
720+
{
721+
if (ModelState.IsValid)
722+
{
723+
// ...
724+
}
725+
726+
return Json(new[] { task }.ToDataSourceResult(request, ModelState));
727+
}
728+
729+
public virtual JsonResult DestroyDependency([DataSourceRequest] DataSourceRequest request, DependencyViewModel task)
730+
{
731+
if (ModelState.IsValid)
732+
{
733+
// ...
734+
}
735+
736+
return Json(new[] { task }.ToDataSourceResult(request, ModelState));
737+
}
738+
```
739+
{% endif %}
501740

502741
## (Optional) Reference Existing Gantt Instances
503742

docs/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ baseurl: /kendo-ui
718718
cdnVersion: "2024.4.1112"
719719

720720
## The themes CDN used
721-
themesCdnVersion: "10.0.0"
721+
themesCdnVersion: "10.0.1"
722722

723723
## The MVC Core version used
724724
mvcCoreVersion: "2024.4.1112"

0 commit comments

Comments
 (0)