Skip to content

Releases: klinecharts/KLineChart

Version 10.0.0-beta2

19 May 19:17

Choose a tag to compare

  • 🆕 New Features

    • Support multiple y-axes. Multiple y-axes can be created in the same pane, and indicators can be bound to a specified y-axis through yAxisId.
    • Add instance methods overrideXAxis(options) and overrideYAxis(options) for independently configuring the x-axis and y-axis.
    • The chart now supports automatically listening to container size changes and calling resize().
    • Add the text type to indicator figures, allowing indicator figures to draw text directly.
  • 👉 Changes

    • In the chart method init(ds, options), options.layout has been changed from an array structure to an object structure, with basicParams and panes added:
      • basicParams supports configuring barSpaceLimitMin, barSpaceLimitMax, yAxisPosition, yAxisInside, paneMinHeight, and paneHeight.
      • panes is used to configure pane layout, and pane content supports specifying a y-axis configuration for an indicator through { indicator, yAxis }.
    • The instance method createIndicator(indicator, isStack?, paneOptions?) has been changed to createIndicator(indicator, options?), and options supports isStack, pane, and yAxis.
    • setPaneOptions(options) no longer includes axis configuration. Use overrideXAxis(options) or overrideYAxis(options) for axis configuration.
    • Add yAxisId to the filter parameter of convertToPixel(value, filter?) and convertFromPixel(coordinate, filter?).
  • 🐞 Fixed the parameter type error of the instance API setZoomAnchor.

  • 💄 Optimized the build process. The build tool has been changed from rollup to Vite, and type-check has been added.

Version 10.0.0-beta1

20 Nov 18:25

Choose a tag to compare

  • 🆕 New Features
    • Support thousands separators and custom decimal collapse.
    • Support displaying future time on the x-axis.
    • Support dragging the y-axis on mobile devices.
    • Support creating multiple metrics with the same name on the same window.
    • Rewrote the axis module; custom y-axis supports setting the range.
    • Add zoomAnchor to the options method of the chart method init(dom, options).
    • New instance methods setZoomAnchor(anchor), getZoomAnchor(), setDataLoader(loader), setSymbol(symbol), getSymbol(), setPeriod(period), getPeriod(), resetData(), setThousandsSeparator(thousandsSeparator) , getThousandsSeparator() , setDecimalFold(decimalFold) , getDecimalFold() , getIndicators() and getOverlays() .
    • Add style configurations: candle.priceMark.last.extendTexts, candle.tooltip.title, candle.tooltip.legend, indicator.tooltip.title, indicator.tooltip.legend, crosshair.horizontal.features, candle.bar.compareRule, indicator.ohlc.compareRule, and candle.priceMark.last.compareRule.
    • Add onIndicatorTooltipFeatureClick and onCrosshairFeatureClick to the type parameter in the instance methods subscribeAction and unsubscribeAction.
  • 👉 Changes
    • In the chart method init(dcs, options), the position sub-item of options.layout has been changed to order, options.thousandsSeparator has been changed to the object { sign, format }, options.decimalFoldThreshold has been changed to options.decimalFold, options.customApi has been changed to options.formatter, and the parameter of formatDate has been changed to an object.
    • In the instance methods setCustomApi and getCustomApi have been changed to getFormatter, the return value of getBarSpace() has been changed to an object, the return value of createIndicator has been changed to return the indicator ID, and the input parameter paneId of overlayIndicator has been merged into the input parameter indicator.
    • The return value of the custom metric createTooltipDataSource method has been changed from values to legends, and icons to features.
    • The style configurations candle.tooltip.icons and indicator.tooltip.icons have been changed to indicator.tooltip.features.
  • 💄 Optimizations
    • Optimized the figure element in the overlay template to ignore event types, ensuring the event name matches the event name in overlay.
    • Optimized the execution of metric calculation tasks.
    • Optimized the triggering of scroll events on mobile devices.
  • 🗑 Deprecated
    • The following chart methods have been removed: utils.drawArc(ctx, arc, styles), utils.drawCircle(ctx, circle, styles), utils.drawLine(ctx, line, styles), utils.drawPolygon(ctx, polygon, styles), utils.drawRect(ctx, rect, styles), utils.drawText(ctx, text, styles), utils.drawRectText(ctx, rectText, styles). Please use getFigureClass(name) instead.
    • The following instance method has been removed: setPriceVolumePrecision(pricePrecision, volumePrecision). Please use setPrecision(precision) instead.
    • In the instance API, remove setLoadMoreData, applyNewData, and updateData. Replace them with setDataLoader. Remove clearData, setPrecision, and getPrecision.
    • In the instance method, remove getIndicatorByPaneId(paneId, name). Replace it with getIndicators(filter).
    • In the instance method, remove getOverlayById(id). Replace it with getOverlays(filter).
    • In the instance methods subscribeAction and unsubscribeAction, remove the parameter onTooltipIconClick. Replace it with onCandleTooltipFeatureClick and onIndicatorTooltipFeatureClick.
    • The style configuration removes yAxis.position, yAxis.type, yAxis.inside, and yAxis.inside. Please use the properties in the axis section of the window configuration instead. For details, see the chart API [init(dcs, options)](/api/chart/init#parameters), the instance APIs [createIndicator(value, isStack, paneOptions)](/api/instance/createIndicator#parameters), and [setPaneOptions(options)](/api/instance/setPaneOptions#parameters).
    • In style configuration, remove candle.tooltip.defaultValue and replace candle.tooltip.custom with candle.tooltip.legend. Also remove candle.tooltip.text, indicator.tooltip.showName, and indicator.tooltip.showParams; use indicator.tooltip.title instead. Remove indicator.tooltip.defaultValue and replace it with indicator.tooltip.legend. Also remove indicator.tooltip.text and overlay.rectText.
    • In built-in basic graphics, remove rectText and replace it with text.

Version 10.0.0-alpha9

01 Sep 17:55

Choose a tag to compare

  • 👉 Change the return value of the indicator method calc from an array to an object keyed by a timestamp.
  • 💄 Optimize indicator calculation task execution.
  • 🐞 Fix an issue where the instance APIs setSymbol, setPeriod, and setDataLoader did not reset the Y axis.

Version 10.0.0-alpha8

13 Jun 17:21

Choose a tag to compare

  • 🐞 Fix typescript reference error.

Version 10.0.0-alpha7

13 Jun 17:19

Choose a tag to compare

  • 👉 Chart api init(ds, options) , options.customApi changed to options.formatter , formatDate parameter changed to object.
  • 👉 Instance api setCustomApi changed to setFormatter , getCustomApi changed to getFormatter.
  • 🆕 Style configuration add candle.priceMark.last.extendTexts , candle.tooltip.title , candle.tooltip.legend , indicator.tooltip.title , indicator.tooltip.legend and crosshair.horizontal.features .
  • 🆕 Instance api add setDataLoader , setSymbol , getSymbol , setPeriod , getPeriod and resetData .
  • 🆕 Instance api subscribeAction and unsubscribeAction params add onIndicatorTooltipFeatureClick and onCrosshairFeatureClick .
  • 🗑 Remove candle.tooltip.defaultValue in style configuration, replace candle.tooltip.custom with candle.tooltip.legend, remove candle.tooltip.text, remove indicator.tooltip.showName, indicator.tooltip.showParams, use indicator.tooltip.title, remove indicator.tooltip.defaultValue, replace with indicator.tooltip.legend, remove indicator.tooltip.text.
  • 🗑 Remove setLoadMoreData , applyNewData , updateData in instance api, replace with setDataLoader, remove clearData, setPrecision and getPrecision .
  • 🐞 Fix the confusion of overlay onSelected and onDeselected responses.
  • 🐞 Fix the display problem when the style configuration candle.type is ohlc .
  • 💄 Optimize the default event response of overlay events.
  • 💄 Optimize the x-axis display.

Version 10.0.0-alpha6

11 Jun 18:28

Choose a tag to compare

  • Error publish.

Version 10.0.0-alpha5

09 Mar 17:10

Choose a tag to compare

  • 👉 Style configuration candle.tooltip.icons changed to candle.tooltip.features, indicator.tooltip.icons changed to indicator.tooltip.features.
  • 👉 icons in the return value of the createTooltipDataSource method in the indicator changed to features.
  • 👉 The instance api subscribeAction and unsubscribeAction input parameter onTooltipIconClick changed to onCandleTooltipFeatureClick, and the indicator event is replaced by indicator.onClick.
  • 🐞 Fix the problem that scrolling cannot be performed in certain situations on mobile terminals.
  • 💄 Optimize the display of overlay event response.

Version 10.0.0-alpha4

22 Feb 18:08

Choose a tag to compare

  • 🐞 Fix the issue that the parameter more.backward of applyNewData instance method is incorrect.
  • 🐞 Fix the issue that a single piece of data causes a chart error.

Version 10.0.0-alpha3

18 Feb 18:19

Choose a tag to compare

  • 👉 The return value of the instance api createIndicator is changed to return the indicator id.
  • 👉 The input parameter paneId of the instance api overlayIndicator is merged into the input parameter indicator.
  • 👉 The return value of the instance api getIndicators is changed to return an array.
  • 👉 The return value of the instance api getOverlays is changed to return an array.
  • 🆕 The style configuration adds candle.bar.compareRule, indicator.ohlc.compareRule and candle.priceMark.last.compareRule.
  • 🆕 Supports dragging the y-axis on mobile devices.
  • 🆕 Supports creating multiple indicators with the same name on the same window.
  • 💄 Optimize figure in overlay template to ignore event type, and the event name is consistent with the event name in overlay.
  • 🐞 Fix the problem that the indicator custom prompt information may be wrong.
  • 🐞 Fix the problem that the overlay being drawn may not be deleted correctly.
  • 🐞 Fix the problem that the api createOverlay may not be created correctly when points is specified.
  • 🐞 Fix the problem that the api executeAction may cause the subscribeAction to trigger infinitely.

Version 10.0.0-alpha2

19 Dec 18:21

Choose a tag to compare

  • 🆕 The x-axis supports displaying future time.
  • 🐞 Fix the issue that subscribeAction type is ActionType.OnCandleBarClick and it does not work.