Add datetime X-axis support#2
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
HanSur94
added a commit
that referenced
this pull request
Apr 23, 2026
…ooks, time axis, axis labels (#62) * fix(quick-260423-q3v-01): add title rendering to 5 chart widgets - BarChart/Histogram/Scatter/Heatmap/Image widgets now render Title on axes - Uses canonical title block from RawAxesWidget (fg color + WidgetTitleFontSize) - ImageWidget keeps axes invisible but forces title Visible='on' * fix(quick-260423-q3v-02): IconCardWidget Tag branch falls back to Tag.Y(end) - valueAt(now) returns [] when Tag.X is seconds (not serial date) - Added Tag.Y(end) fallback mirroring the Sensor branch - Preserves Units inheritance block unchanged * fix(quick-260423-q3v-03): ImageWidget uses imagesc with explicit colormap for 2D data - Branch on ndims(imgData)==2: imagesc+parula for matrices, image() for RGB - image() was clipping scalar-field matrices to colormap 1..64, rendering a dark block - Title kept visible in refresh() too (idempotent with render() setting) - Scaling property untouched (API compat) * fix(quick-260423-q3v-04): add SizeChangedFcn+relayout_ to 7 pixel-dependent widgets - ChipBar/IconCard/MultiStatus/Number/Sparkline/Status/Text now rescale on resize - relayout_ tears down uicontrols+axes children and re-renders (idempotent) - try/catch guards SizeChangedFcn for Octave versions that reject it - New private methods block added to SparklineCardWidget and TextWidget * fix(quick-260423-q3v-05): human-readable time-axis labels via formatTimeAxis_ - FastSenseWidget: call formatTimeAxis_ after fp.render() in render/rebuildForTag_ and after updateData() in refresh/update paths - EventTimelineWidget: call formatTimeAxis_ at end of refresh() - Helper converts numeric seconds to HH:MM:SS (range >= 1h) or MM:SS (< 1h) via datestr(xt/86400, fmt); no-op for ranges <= 300s - Cosmetic-only: underlying numeric X data untouched, zoom may regenerate numeric ticks (known limitation) * fix(quick-260423-q3v-06): ScatterWidget auto-derives xlabel/ylabel from SensorX/SensorY - refresh() now calls xlabel/ylabel after plot when SensorX/SensorY set - axisLabelForSensor_ helper builds 'Name (Units)' with graceful Key/empty fallback - No-op when sensors unset (preserves current behavior) * fix(widgets): title re-apply in refresh + thermometer aspect ratio BarChartWidget.refresh and HistogramWidget.refresh now re-apply the title after bar()/plot() calls. Those plot commands internally call newplot which clears the axes title, so the render-time title was being wiped the moment data rendered. GaugeWidget.renderThermometer drops the fixed DataAspectRatio [1 2 1] and widens its axes Position ([0.15 0.10 0.7 0.80]) so the thermometer fills a narrow 4-column panel instead of cramping the bulb, value, and min/max labels on top of each other. Follow-up to quick-task 260423-q3v audit bugs. * fix(IconCardWidget): stop self-erasing Tag via Sensor alias The constructor's "if Tag is set, clear Sensor" block was destructive: after Phase 1011 migrated Sensor to a Dependent alias for Tag (see DashboardWidget.set.Sensor), `obj.Sensor = []` resolves to `obj.Tag = []` and wipes the Tag we just assigned. The refresh loop then hits the empty-Tag branch and the widget shows "--" forever, even with a fully populated SensorTag bound. This was the real root cause of bug #2 in the widget audit — the valueAt(now)/Y(end) fallback I added in quick-260423-q3v-02 never ran because Tag was already empty by the time refresh fired. Kept the Threshold clear (Threshold is a real independent property).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
XTypeproperty ('numeric'or'datenum') to FastPlot with auto-detection of MATLABdatetimeobjectsmmm dd HH:MM,HH:MM, andHH:MM:SSbased on visible rangeexample_toolbar.mand README documentationTest Plan
test_datetimepasses — XType property, datenum detection, datetime auto-convert, tick label formatting, zoom format change, toolbar formatX🤖 Generated with Claude Code