基点をずらしてグラフを表示させるには

【ご質問】
BarLayer等でデータ毎に起点を指定して表示させることは可能でしょうか。

【回答】
基点の位置をずらすようなAPIは標準で用意されていませんが、
透明なレイヤを表示させることで実現可能かと思います。

詳細は以下のサンプルをご参照ください。

{curl 6.0,7.0,8.0 applet}

{import * from CURL.GUI.CHARTS}

{define-proc package {v-gradient
                                   start-color:FillPattern,
                                   highlight-color:FillPattern,
                                   end-color:FillPattern,
                                   highlight-pos:double = 0.5
                               }:FillPattern
    {return
        {LinearGradientFillPattern
            {Fraction2d 0, 0},
            {Fraction2d 0, 1},
            {Spectrum.from-envelope
                start-color,
                0.0,
                highlight-color,
                highlight-pos,
                end-color,
                1.0
            }
        }
    }
}

{let records:RecordSet =
    {RecordSet
        {RecordFields
            {RecordField
                “Region”,
                domain = String
            },
            {RecordField “M1”, caption = “January”, domain = int},
            {RecordField “M2”, caption = “February”, domain = int},
            {RecordField “M3”, caption = “March”, domain = int}
        },
        {RecordData Region = “North”, M1 = 100, M2 = 140, M3 = 130 },
        {RecordData Region = “East”, M1 = 110, M2 = 140, M3 = 170},
        {RecordData Region = “South”, M1 = 140, M2 = 100, M3 = 130},
        {RecordData Region = “West”, M1 = 160, M2 = 190, M3 = 140}
    }
}

{let chart:LayeredChart =
    {LayeredChart
        width = 10cm,
        height = 6cm,
        flipped? = true,
        legend-enabled? = false,
        color-palette =
            {new {Array-of FillPattern},
                {v-gradient “transparent”, “transparent”, “transparent”},
                {v-gradient “blue”, “lavender”, “steelblue”},
                {v-gradient “red”, “mistyrose”, “crimson”}
            },
        bar-border-width = 0px,
        {BarLayer
            stacking-mode = ChartStackingMode.stacked,
            {ChartDataSeries records, “M1”},
            {ChartDataSeries records, “M2”},
            {ChartDataSeries records, “M3”},
            x-axis-data = {ChartDataSeries records, “Region”}
        }
    }
}

{value
    chart
}