public override void RenderContent( Content content, Evaluator evaluator, Region region, ElementDesigns elementDesigns) { // このメソッドはコンテントの描画が行われる直前に呼ばれます // "content_example"という識別子を持ったコンテントに対して処理を行います if ("content_example".Equals(content.Design.Id)) { // "graph"という識別子を持った要素を取得し、レイアウトと色を修正します ElementDesign e = elementDesigns.Find("graph"); // ".NUM"という式を評価することで、NUM列の値を得ます Decimal num = (Decimal)evaluator.EvalTry(".NUM"); if (num >= 0) { e.Child("layout").Put("x1", 100); e.Child("layout").Put("x2", 100 + num); e.Put("fill_color", "lightblue"); } else { e.Child("layout").Put("x1", 100 + num); e.Child("layout").Put("x2", 100); e.Put("fill_color", "pink"); } } }