説明
例
{Distance2d position, 10pt}
例: ChartTick サブクラス化による major-tick-factory の使用 | |
{import * from CURL.GUI.CHARTS} {import * from CHARTS-DOC, location = "../docstring-support/gui/charts-doc.scurl" } {define-class package final MyArrowTick {inherits ArrowShape, ChartTick} {constructor package {default axis-position:AxisPosition, position:Distance, tick-index:int, value:any, ... } {construct-super.ChartTick axis-position, position, tick-index, value} {construct-super.ArrowShape ...} } } {LayeredChart width = 15cm, height = 7cm, arrow-head-style = ArrowStyle.solid, arrow-head-width = 6px, arrow-head-length = 6px, arrow-body-width = 2px, arrow-tail-style = ArrowStyle.none, bottom-axis-parent = {ShapeGroup || Override for just the bottom axis: major-tick-factory = {proc {axis:ChartAxis, value:any, tick-index:int, position:Distance }:Shape {return {MyArrowTick axis.position, position, tick-index, value, {Distance2d position, 0pt}, {Distance2d position, 10pt} } } } }, {LineLayer sample-records, "Age", "Points", x-axis-data = {ChartDataSeries sample-records, "Name"} } } |