Hello am working on an asp.net mvc project. I need to presente dinamicly some datacharts on a tile.
How can i create a tile with a datachart in each item?I am using infragisctics 2018.1.
THX
Hello David,
Thank you for your patience!
I am attaching a sample, based on your requirement.
To create a tile manager with data charts as elements you need to do following configurations:
- Each chart should be in a separate cshtml file
- Create a datasource, which will contain information for every chart, like this example:
public IActionResult Index() { ChartModel[] charts = { new ChartModel { Name="Column",Control="ColumnChart" }, new ChartModel { Name="Bar",Control="BarChart" } }; return View(charts); }
- After adding the data source to the tileManager you have to set its states and if you want the chart to be visible in MaximizedState, you have to add an iframe to point to the route of the chart, like :
Html.Infragistics() .TileManager(Model.AsQueryable()) .ID("dashboard") .ColumnWidth(240) .ShowSplitter(true) .MinimizedState("<h3>${Name}</h3>") .MaximizedState("<iframe src = " + "/Home/${Control} " + "width=" + 800 + " height=" + 800 + "></iframe>") .DataBind() .Render()
In a nutshell you have to reference the chart through iframes in order to render them.TileManagerIssue.zipPlease, let me know if you have any further questions.Best Regards,Hristo Popov