How is it possible to add a "custom" legend from code behind is it even possible to create a legend with my code ? or should i do something else ?
Thanks for help and fast answer !!
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(!IsPostBack)
{
HolidayTrackerEntities ctx = HtEntityFactory.Context;
IEnumerable<HtUser> users = ctx.HtUsers;
int
year = 2013;
double
usedVacation = 0;
double
bookedVacation = 0;
foreach
(HtUser user
in
users)
{
usedVacation += user.GetUsedVacation(year);
bookedVacation += user.GetBookedVacation(year);
}
double
forcastVacation = usedVacation + bookedVacation;
List<
double
> src =
new
List<
double
>();
src.Add(usedVacation);
src.Add(bookedVacation);
src.Add(forcastVacation);
VacationPieChart.DataSource = src;
VacationPieChart.DataBind();
}
}
Thanks for help and fast answer !!