説明
注意事項
新しい SimpleDateTimeAxis を作成します。 |
この軸の目盛りを生成するために使用する実際のタイムスケール。 |
軸が主目盛りを表示される目盛りの初めに追加される際の調整を行います。 |
特定の |
When non-null, this |
An array containing the actual gaps elided when the current contents of the chart were generated. |
この軸の主目盛りあたりの最小スペース ( |
この軸の副目盛りあたりの最小スペース ( |
この軸を拡張して、( |
週に対応する日付の目盛りを決定するために、週の始まりを指定します。 |
この軸の目盛りを生成するために使用する時間単位を指定します。 |
主目盛りを表す |
この軸に沿った主目盛りを表すのに必要なすべての |
補助目盛りを表す |
この軸に沿った補助目盛りを表すのに必要なすべての |
指定の目盛りの目盛りラベルを生成します。 |
この軸に沿って値を表示するために使用される |
この軸に沿ったゼロに対応する空間位置を取得します。 |
データ値に対応する空間位置を計算します。 |
この軸に沿った位置に対応するデータ値を計算します。 |
適切な |
軸に必要なすべてのレイアウト操作を実行します。 |
新しい SimpleDateTimeAxis を作成します。
例
この軸の目盛りを生成するために使用する実際のタイムスケール。
説明
注意事項
例
軸が主目盛りを表示される目盛りの初めに追加される際の調整を行います。
説明
例
特定の
説明
注意事項
例
例: Controlling the Displayed Time Zone using display-time-zone | |
{import * from CURL.GUI.CHARTS} {import * from CHARTS-DOC, location = "../docstring-support/gui/charts-doc.scurl" } {def package sample-records = {get-sample-records-with-times span-of-hours? = true}} {RecordGrid height = 6cm, record-source = sample-records} {def package axis = {SimpleDateTimeAxis {ChartDataSeries sample-records, "Time"} } } {def package chart:LayeredChart = {LayeredChart width = 15cm, height = 6cm, bottom-axis = axis, {LineLayer sample-records, "Achievements", "Score" } } } {Canvas width = chart.width, height = chart.height, chart } {CheckButton label = "Use UTC time zone?", value = false, {on ValueChanged at cb:CheckButton do set axis.display-time-zone = {if cb.value then DateTimeZone.utc else DateTimeZone.local } } } |
When non-null, this
説明
例
例: Using a DateTimeGapFinder with SimpleDateTimeAxis | |
{import * from CURL.GUI.CHARTS} {import * from CHARTS-DOC, location = "../docstring-support/gui/charts-doc.scurl" } {def package x-axis = {SimpleDateTimeAxis {ChartDataSeries gap-records, "Date"} } } {let package constant highlight-group:ShapeGroup = {ShapeGroup draw-operation = DrawOperation.blend, color = {FillPattern.from-rgb 0.2, 0.2, 0.2, opacity = 0.5} } } {def package chart:LayeredChart = {LayeredChart width = 15cm, height = 6cm, legend-enabled? = false, bottom-axis = x-axis, {LineLayer {ChartDataSeries gap-records, "Value"} }, {ScatterLayer scatter-shape-size = 3pt, {ChartDataSeries gap-records, "Value"}}, {on e:PointerMotion at event-target:Visual do def layer = chart.layers[chart.layers.size - 1] def bar-width = {layer.quantize-line-thickness 1px} def (x, y) = {transform-coordinates e.x, e.y, event-target, layer} def data = layer.y-axis-data[0] def mapping = {layer.get-data-mapping data} def record = {layer.get-nearest-record-in-data x, y, data, mapping} {if record == null then {highlight-group.detach} {return} } def record-pos = {mapping.get-position {non-null record}, 0} {highlight-group.clear} {highlight-group.set-translation-in-parent record-pos.x, record-pos.y} {highlight-group.add {RectangleShape {GRect 0.5 * bar-width, 0.5 * bar-width, 10m, 10m} } } {highlight-group.add {RectangleShape {GRect 10m, 10m, 0.5 * bar-width, 0.5 * bar-width} } } def date = record["Date"] asa DateTime {highlight-group.add {GraphicShape {VBox halign = "center", vorigin = "top", {Fill height = 6pt}, {Frame margin = 2pt, border-width = 1px, background = {FillPattern.from-rgb 1, 1, 1, opacity = 0.7}, color = {FillPattern.from-rgb 0.25, 0.25, 0.25}, {format "Date: %02d/%02d/%02d\nValue: %s", date.info.year, date.info.month, date.info.day, record["Value"] } } } } } {layer.add highlight-group} } } } {RecordGrid height = 6cm, record-source = gap-records, {RecordGridColumn "Date"}, {RecordGridColumn "Value", format-spec = "%.04f"} } {CheckButton label = "Use gap finder?", value = (x-axis.gap-finder != null), {on ValueChanged at cb:CheckButton do {if cb.value then set x-axis.gap-finder = {DateTimeAutoGapFinder} else set x-axis.gap-finder = null } } } {Canvas width = chart.width, height = chart.height, chart } |
An array containing the actual gaps elided when the current contents of the chart were generated.
説明
例
例: Using the gaps field | |
{import * from CURL.GUI.CHARTS} {import * from CHARTS-DOC, location = "../docstring-support/gui/charts-doc.scurl" } {RecordGrid height = 6cm, record-source = gap-records, {RecordGridColumn "Date"}, {RecordGridColumn "Value", format-spec = "%.04f"} } {def package x-axis = {SimpleDateTimeAxis {ChartDataSeries gap-records, "Date"}, gap-finder = {DateTimeAutoGapFinder} } } {let package constant group:ShapeGroup = {ShapeGroup draw-operation = DrawOperation.blend, color = {FillPattern.from-rgb 0.5, 0.5, 1.0, opacity = 0.5} } } {def package chart:LayeredChart = {LayeredChart width = 15cm, height = 6cm, legend-enabled? = false, bottom-axis = x-axis, {LineLayer {ChartDataSeries gap-records, "Value"}}, {on e:ChartLayoutChanged do def layer = chart.layers[0] {group.clear} {if-non-null gaps = x-axis.gaps then {for gap in gaps do def x = {x-axis.get-position gap.start} def y0 = -chart.plot-area-bounds.height def y1 = 0cm {group.add {PathShape line-style = LineStyle.dash, {Path {Distance2d x, y0}, PathOperation.line-to, {Distance2d x, y1}} } } } } {layer.add group} } } } {CheckButton label = "Use gap finder?", value = (x-axis.gap-finder != null), {on ValueChanged at cb:CheckButton do {if cb.value then set x-axis.gap-finder = {DateTimeAutoGapFinder} else set x-axis.gap-finder = null } } } {Canvas width = chart.width, height = chart.height, chart } |
この軸の主目盛りあたりの最小スペース (
説明
この軸を拡張して、(
説明
例
例: Using round-extents-to-tick-span? and allowed-distance-to-first-tick | |
{import * from CURL.GUI.CHARTS} {import * from CHARTS-DOC, location = "../docstring-support/gui/charts-doc.scurl" } {def package sample-records = {get-sample-records-with-times}} {RecordGrid height = 6cm, record-source = sample-records} {def package axis = {SimpleDateTimeAxis {ChartDataSeries sample-records, "Time"} } } {def package chart:LayeredChart = {LayeredChart width = 15cm, height = 6cm, bottom-axis = axis, {LineLayer sample-records, "Achievements", "Score" } } } {Canvas width = chart.width, height = chart.height, chart } {CheckButton label = "round-extents-to-tick-span?", value = axis.round-extents-to-tick-span?, {on ValueChanged at cb:CheckButton do set axis.round-extents-to-tick-span? = cb.value } } allowed-distance-to-first-tick (cm): {TextField value = "" & axis.allowed-distance-to-first-tick / 1cm, {on ValueFinished at tf:TextField do set axis.allowed-distance-to-first-tick = {tf.value.to-double} * 1cm } } |
週に対応する日付の目盛りを決定するために、週の始まりを指定します。
説明
例
例: Using start-of-week | |
{import * from CURL.GUI.CHARTS} {import * from CHARTS-DOC, location = "../docstring-support/gui/charts-doc.scurl" } {def package sample-records = {get-sample-records-with-times}} {RecordGrid height = 6cm, record-source = sample-records} {def package axis = {SimpleDateTimeAxis {ChartDataSeries sample-records, "Time"}, tick-span = DateTimeAxisTimeSpan.month } } {def package chart:LayeredChart = {LayeredChart width = 15cm, height = 6cm, bottom-axis = axis, {LineLayer sample-records, "Achievements", "Score" } } } {Canvas width = chart.width, height = chart.height, chart } start-of-week: {TextField value = "" & axis.start-of-week, {on ValueFinished at tf:TextField do set axis.start-of-week = {tf.value.to-int} } } |
この軸の目盛りを生成するために使用する時間単位を指定します。
説明
注意事項
例
例: Using SimpleDateTimeAxis.tick-span | |
{import * from CURL.GUI.CHARTS} {import * from CHARTS-DOC, location = "../docstring-support/gui/charts-doc.scurl" } {def package sample-records = {get-sample-records-with-times span-of-hours? = true}} {RecordGrid height = 6cm, record-source = sample-records} {def package tick-span-frame = {Frame}} {def package axis = {SimpleDateTimeAxis {ChartDataSeries sample-records, "Time"} } } {def package chart:LayeredChart = {LayeredChart width = 15cm, height = 6cm, bottom-axis = axis, {LineLayer sample-records, "Achievements", "Score" }, {on e:ChartLayoutChanged do {tick-span-frame.add replace? = true, {format "%s", axis.actual-tick-span}} } } } {Canvas width = chart.width, height = chart.height, chart } {GroupBox label = "Actual tick span in use:", tick-span-frame } {GroupBox label = "tick-span:", {RadioFrame {spaced-vbox {RadioButton radio-value = DateTimeAxisTimeSpan.minute}, {RadioButton radio-value = DateTimeAxisTimeSpan.hour}, {RadioButton radio-value = DateTimeAxisTimeSpan.day}, {RadioButton radio-value = DateTimeAxisTimeSpan.week}, {RadioButton radio-value = DateTimeAxisTimeSpan.month}, {RadioButton radio-value = DateTimeAxisTimeSpan.year}, {RadioButton radio-value = DateTimeAxisTimeSpan.decade}, {RadioButton radio-value = DateTimeAxisTimeSpan.auto, value = true} }, {on ValueFinished at rf:RadioFrame do set axis.tick-span = rf.value asa DateTimeAxisTimeSpan } } } {CheckButton label = "round-extents-to-tick-span?", value = axis.round-extents-to-tick-span?, {on ValueChanged at cb:CheckButton do set axis.round-extents-to-tick-span? = cb.value } } |
主目盛りを表す
戻り値
説明
注意事項
この軸に沿った主目盛りを表すのに必要なすべての
説明
補助目盛りを表す
戻り値
説明
注意事項
この軸に沿った補助目盛りを表すのに必要なすべての
説明
指定の目盛りの目盛りラベルを生成します。
戻り値
説明
注意事項
この軸に沿って値を表示するために使用される
戻り値
この軸に沿ったゼロに対応する空間位置を取得します。
説明
注意事項
データ値に対応する空間位置を計算します。
戻り値
説明
この軸に沿った位置に対応するデータ値を計算します。
戻り値
説明
適切な
戻り値
説明
オーバーライド
軸に必要なすべてのレイアウト操作を実行します。
説明