This question is locked. New answers and comments are not allowed.
Sir,
First of all A Big thanks to the Development Teams for the awesome GUI .
Now i am going to state the problem. I have a Kendo chart in my view like:
@(Html.Kendo().Chart<.DrugCashFlow.PackagePrice>()
.Name("PriceDateChart")
.Title("Line graph of prices").AutoBind(false)
.DataSource(datasource => datasource
.Read(read => read.Action("GetFuturePricesForChart", "Fpm").Data("GetInputData"))
)
.Series(series =>
{
series.Column(model => model.Price.AverageWholesalePrice)
.Name("AverageWholesalePrice");
})
.Legend(legend => legend
.Position(ChartLegendPosition.Top)
)
.ValueAxis(axis => axis.Numeric()
.Labels(labels => labels
.Format("{0}")
.Skip(2)
.Step(2)
)
)
.CategoryAxis(axis => axis.Date()
.Categories(model => model.Price.MedispanEffectiveDate)
.BaseUnit(ChartAxisBaseUnit.Years)
)
.Tooltip(tooltip => tooltip
.Visible(true)
.Format("{0}")
.Template("#= series.name #: #= value #")
)
)
</div>
and the controller for this is:
public ActionResult GetFuturePricesForChart(String VendorName, String DrugName, String PeriodType, String Outlook, String EndDate, String Current_Price)
{
FpmOutputParams _output = GetFuturePricesFromService(VendorName, DrugName, PeriodType, Outlook, EndDate, Current_Price);
if (_output == null)
return (Json(new List<DrugCashFlow.PriceData>()));
List<PackagePrice> pkgPxList = new List<PackagePrice>();
foreach (var _x in _output.Prices)
{
DateTime _effDate = _x.EffectiveDate;
foreach (var _y in _x.DosagePriceList)
{
_y.AveragePrice.Price.MedispanEffectiveDate = _effDate;
pkgPxList.Add(_y.AveragePrice);
}
}
return Json(pkgPxList);
}
but I am not getting data on the chart. Please help me
First of all A Big thanks to the Development Teams for the awesome GUI .
Now i am going to state the problem. I have a Kendo chart in my view like:
@(Html.Kendo().Chart<.DrugCashFlow.PackagePrice>()
.Name("PriceDateChart")
.Title("Line graph of prices").AutoBind(false)
.DataSource(datasource => datasource
.Read(read => read.Action("GetFuturePricesForChart", "Fpm").Data("GetInputData"))
)
.Series(series =>
{
series.Column(model => model.Price.AverageWholesalePrice)
.Name("AverageWholesalePrice");
})
.Legend(legend => legend
.Position(ChartLegendPosition.Top)
)
.ValueAxis(axis => axis.Numeric()
.Labels(labels => labels
.Format("{0}")
.Skip(2)
.Step(2)
)
)
.CategoryAxis(axis => axis.Date()
.Categories(model => model.Price.MedispanEffectiveDate)
.BaseUnit(ChartAxisBaseUnit.Years)
)
.Tooltip(tooltip => tooltip
.Visible(true)
.Format("{0}")
.Template("#= series.name #: #= value #")
)
)
</div>
and the controller for this is:
public ActionResult GetFuturePricesForChart(String VendorName, String DrugName, String PeriodType, String Outlook, String EndDate, String Current_Price)
{
FpmOutputParams _output = GetFuturePricesFromService(VendorName, DrugName, PeriodType, Outlook, EndDate, Current_Price);
if (_output == null)
return (Json(new List<DrugCashFlow.PriceData>()));
List<PackagePrice> pkgPxList = new List<PackagePrice>();
foreach (var _x in _output.Prices)
{
DateTime _effDate = _x.EffectiveDate;
foreach (var _y in _x.DosagePriceList)
{
_y.AveragePrice.Price.MedispanEffectiveDate = _effDate;
pkgPxList.Add(_y.AveragePrice);
}
}
return Json(pkgPxList);
}
but I am not getting data on the chart. Please help me