private static void FillData(DataSetElement dataSet, int factoryId) { // // Build Data // var outputs = FactoryRepository.FindAllFactoryOutputByFactoryId(factoryId); var num = 0; foreach(var output in outputs) { var set = new ValueSetElement { //Label = output.DatePro.Value.ToShortDateString(), Value = output.Quantity ?? 0 }; if((num++ % 2) == 0) set.Link.SetLink(FusionLinkMethod.Local, "javascript:PopUp('April');"); // 실제 Javascript 메소드를 쓰려면 "PopUp-April" 로만 쓰면 된다. else { set.Link.SetLink(FusionLinkMethod.PopUp, WebTool.GetScriptPath("~/Charts/Ajax/Default.aspx?FactoryId=") + factoryId); set.Link.Width = 600; set.Link.Height = 400; } dataSet.AddSet(set); } }
public virtual ValueSetElement AddSet(string label, double?value) { var set = new ValueSetElement(value) { Label = label }; SetElements.Add(set); return(set); }
private static void FillData(SingleSeriesChart chart, int factoryId) { // // Build Data // var outputs = FactoryRepository.FindAllFactoryOutputByFactoryId(factoryId); var num = 0; foreach(var output in outputs) { var set = new ValueSetElement { Label = output.DatePro.Value.ToShortDateString(), Value = output.Quantity ?? 0 }; switch(num % 4) { case 0: set.Link.SetLink(FusionLinkMethod.Local, "javascript:PopUp('April')"); break; case 1: set.Link.SetLink(FusionLinkMethod.PopUp, WebTool.GetScriptPath("~/Charts/Ajax/Default.aspx?FactoryId=") + factoryId); break; case 2: set.Link.SetFameLink(WebTool.GetScriptPath("~/Charts/Ajax/Default.aspx?FactoryId=") + factoryId, "_blank"); break; case 3: set.Link.SetJavascriptLink("PopUp", "April"); break; default: set.Link.SetLink(FusionLinkMethod.Local, "http://www.realweb21.com"); break; } num++; //if ((num++ % 2) == 0) // set.Link.SetLink(FusionLinkMethod.Local, "javascript:PopUp('April');"); // 실제 Javascript 메소드를 쓰려면 "PopUp-April" 로만 쓰면 된다. //else //{ // set.Link.SetLink(FusionLinkMethod.PopUp, WebTool.GetScriptPath("~/Charts/Ajax/Default.aspx?FactoryId=") + factoryId.ToString()); // set.Link.Width = 600; // set.Link.Height = 400; //} chart.SetElements.Add(set); } }
public virtual ValueSetElement AddSet(string label, double? value) { var set = new ValueSetElement(value) { Label = label }; SetElements.Add(set); return set; }