Repository navigation
Quick Charts 2.2.0
The way back to the live edge and the plot a host control floats over, touch that follows the hand, and the formatter, the glyph lists and the icon artwork for hosts that draw their own. No public name changes.
The return to the live edge glides: goLive, its command and Alt+L ease the view home sideways over about half a second, keeping the zoom and the price scale as they are. From far back the view steps in to a width and a half first, and a touch, a drag, a wheel or any other navigation stops it where it stands. Under a reduced-motion preference it goes in one step.
A chart reads whether its view sits back from the live edge: awayFromLiveEdge() and the liveEdge event, reported once per change, with a glide under way and bar replay reading as returned. plotArea() and the plotArea event give the main pane's plot in the pixels of the host's element, so a control floating over the bars stays beside the price scale as it widens.
Two fingers zoom proportionally: the bars spread exactly as far as the fingers do, and the point under the fingers stays under them as they travel. A pan one finger began before the second landed stays a pan, and a drawing that holds the pointer holds the pinch off.
@trdrs/quickcharts/format carries the price formatter and its types alone, with nothing that names a window, a document or a DOM type, so a native view or a server writes a price exactly as the chart's axis does.
A finger held on the plot scrubs the crosshair for as long as it stays down: the crosshair follows the finger, and lifting it takes the crosshair away, so the next one-finger drag pans the chart.
A flick of one finger coasts the chart calmly: the throw leaves the finger at no more than two pixels a millisecond and slows smoothly to rest within about a second, and a touch or any other navigation stops it where it stands.
touch.freePan makes the chart a canvas under the finger: a one-finger drag on the plot releases the main price scale's framing, as a drag on the price scale does, so the price follows the finger as freely as the time and nothing re-frames while the viewer pans, flicks or pinches, and a pinch zooms the time and leaves the price where it stands. A double-tap on the price scale, a new symbol or timeframe, and goLive frame the bars again. It is off unless the host turns it on.
chartIconArtwork(id) answers the chart's own drawings of an icon as standalone svg markup on currentColor, each on its own grid, so a host draws the same icons the chart does in a toolbar of its own or a native view. It answers the chart's artwork whatever icons draws instead; an illustration drawn in the theme's roles answers none.
@trdrs/quickcharts/glyphs carries the glyph picker's lists on their own, free of any DOM name: EMOJI_CATEGORIES and ICON_CATEGORIES, each category with the catalog key of its heading, and isEmojiGlyph, so a picker of the host's own offers the same glyphs and arms a glyph tool through chart.drawings.arm with { tool, props: { glyph } }.