Hi Matthew,
Greetings from Syncfusion.
We have analyzed your query. We have prepared a sample based on your requirement. In that sample, we have rendered multiple linear gauges based on the length of data collection that is from controller page.
Please find the below code snippet to achieve this requirement,
Controller.cs
DataTable dt = new DataTable();
dt.Columns.Add("Name");
dt.Columns.Add("FullName");
dt.Columns.Add("Stock");
dt.Columns.Add("MaxStock");
dt.Columns.Add("AvailableStock");
dt.Rows.Add(new Object[] { "T13", "PM01 T13", 1, 100, 34 });
.. . // Add more data
List<LinearData> gauges = new List<LinearData>();
foreach (DataRow row in dt.Rows)
gauges.Add(CreateLinearGauge(row));
ViewBag.GaugeData = gauges;
.CSHTML
@{
var count = 0;
foreach (LinearData gauge in ViewBag.GaugeData)
{
@(Html.EJ().LinearGauge("PointerGauge" + (++count))
)
}
} |
If you are still facing any issues, kindly revert us with modify the above sample or provide more information about your requirement which will be helpful in furthermore analysis and provide you the solution sooner.
Regards,
Baby.