Releases: klinecharts/KLineChart
Releases · klinecharts/KLineChart
Version 10.0.0-beta1
- 🆕 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
zoomAnchorto theoptionsmethod of the chart methodinit(dom, options). - New instance methods
setZoomAnchor(anchor),getZoomAnchor(),setDataLoader(loader),setSymbol(symbol),getSymbol(),setPeriod(period),getPeriod(),resetData(),setThousandsSeparator(thousandsSeparator),getThousandsSeparator(),setDecimalFold(decimalFold),getDecimalFold(),getIndicators()andgetOverlays(). - 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, andcandle.priceMark.last.compareRule. - Add
onIndicatorTooltipFeatureClickandonCrosshairFeatureClickto thetypeparameter in the instance methodssubscribeActionandunsubscribeAction.
- 👉 Changes
- In the chart method
init(dcs, options), thepositionsub-item ofoptions.layouthas been changed toorder,options.thousandsSeparatorhas been changed to the object{ sign, format },options.decimalFoldThresholdhas been changed tooptions.decimalFold,options.customApihas been changed tooptions.formatter, and the parameter offormatDatehas been changed to an object. - In the instance methods
setCustomApiandgetCustomApihave been changed togetFormatter, the return value ofgetBarSpace()has been changed to an object, the return value ofcreateIndicatorhas been changed to return the indicator ID, and the input parameterpaneIdofoverlayIndicatorhas been merged into the input parameterindicator. - The return value of the custom metric
createTooltipDataSourcemethod has been changed fromvaluestolegends, andiconstofeatures. - The style configurations
candle.tooltip.iconsandindicator.tooltip.iconshave been changed toindicator.tooltip.features.
- In the chart method
- 💄 Optimizations
- Optimized the
figureelement in the overlay template to ignore event types, ensuring the event name matches the event name inoverlay. - Optimized the execution of metric calculation tasks.
- Optimized the triggering of scroll events on mobile devices.
- Optimized the
- 🗑 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 usegetFigureClass(name)instead. - The following instance method has been removed:
setPriceVolumePrecision(pricePrecision, volumePrecision). Please usesetPrecision(precision)instead. - In the instance API, remove
setLoadMoreData,applyNewData, andupdateData. Replace them withsetDataLoader. RemoveclearData,setPrecision, andgetPrecision. - In the instance method, remove
getIndicatorByPaneId(paneId, name). Replace it withgetIndicators(filter). - In the instance method, remove
getOverlayById(id). Replace it withgetOverlays(filter). - In the instance methods
subscribeActionandunsubscribeAction, remove the parameteronTooltipIconClick. Replace it withonCandleTooltipFeatureClickandonIndicatorTooltipFeatureClick. - The style configuration removes
yAxis.position,yAxis.type,yAxis.inside, andyAxis.inside. Please use the properties in theaxissection 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.defaultValueand replacecandle.tooltip.customwithcandle.tooltip.legend. Also removecandle.tooltip.text,indicator.tooltip.showName, andindicator.tooltip.showParams; useindicator.tooltip.titleinstead. Removeindicator.tooltip.defaultValueand replace it withindicator.tooltip.legend. Also removeindicator.tooltip.textandoverlay.rectText. - In built-in basic graphics, remove
rectTextand replace it withtext.
- The following chart methods have been removed:
Version 10.0.0-alpha9
- 👉 Change the return value of the indicator method
calcfrom an array to an object keyed by a timestamp. - 💄 Optimize indicator calculation task execution.
- 🐞 Fix an issue where the instance APIs
setSymbol,setPeriod, andsetDataLoaderdid not reset the Y axis.
Version 10.0.0-alpha8
- 🐞 Fix typescript reference error.
Version 10.0.0-alpha7
- 👉 Chart api
init(ds, options),options.customApichanged tooptions.formatter,formatDateparameter changed to object. - 👉 Instance api
setCustomApichanged tosetFormatter,getCustomApichanged togetFormatter. - 🆕 Style configuration add
candle.priceMark.last.extendTexts,candle.tooltip.title,candle.tooltip.legend,indicator.tooltip.title,indicator.tooltip.legendandcrosshair.horizontal.features. - 🆕 Instance api add
setDataLoader,setSymbol,getSymbol,setPeriod,getPeriodandresetData. - 🆕 Instance api
subscribeActionandunsubscribeActionparams addonIndicatorTooltipFeatureClickandonCrosshairFeatureClick. - 🗑 Remove
candle.tooltip.defaultValuein style configuration, replacecandle.tooltip.customwithcandle.tooltip.legend, removecandle.tooltip.text, removeindicator.tooltip.showName,indicator.tooltip.showParams, useindicator.tooltip.title, removeindicator.tooltip.defaultValue, replace withindicator.tooltip.legend, removeindicator.tooltip.text. - 🗑 Remove
setLoadMoreData,applyNewData,updateDatain instance api, replace withsetDataLoader, removeclearData,setPrecisionandgetPrecision. - 🐞 Fix the confusion of overlay
onSelectedandonDeselectedresponses. - 🐞 Fix the display problem when the style configuration
candle.typeisohlc. - 💄 Optimize the default event response of overlay events.
- 💄 Optimize the x-axis display.
Version 10.0.0-alpha6
- Error publish.
Version 10.0.0-alpha5
- 👉 Style configuration
candle.tooltip.iconschanged tocandle.tooltip.features,indicator.tooltip.iconschanged toindicator.tooltip.features. - 👉
iconsin the return value of thecreateTooltipDataSourcemethod in the indicator changed tofeatures. - 👉 The instance api
subscribeActionandunsubscribeActioninput parameteronTooltipIconClickchanged toonCandleTooltipFeatureClick, and the indicator event is replaced byindicator.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
- 🐞 Fix the issue that the parameter
more.backwardofapplyNewDatainstance method is incorrect. - 🐞 Fix the issue that a single piece of data causes a chart error.
Version 10.0.0-alpha3
- 👉 The return value of the instance api
createIndicatoris changed to return the indicator id. - 👉 The input parameter
paneIdof the instance apioverlayIndicatoris merged into the input parameterindicator. - 👉 The return value of the instance api
getIndicatorsis changed to return an array. - 👉 The return value of the instance api
getOverlaysis changed to return an array. - 🆕 The style configuration adds
candle.bar.compareRule,indicator.ohlc.compareRuleandcandle.priceMark.last.compareRule. - 🆕 Supports dragging the y-axis on mobile devices.
- 🆕 Supports creating multiple indicators with the same name on the same window.
- 💄 Optimize
figureinoverlaytemplate to ignore event type, and the event name is consistent with the event name inoverlay. - 🐞 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
createOverlaymay not be created correctly whenpointsis specified. - 🐞 Fix the problem that the api
executeActionmay cause thesubscribeActionto trigger infinitely.
Version 10.0.0-alpha2
- 🆕 The x-axis supports displaying future time.
- 🐞 Fix the issue that
subscribeActiontype isActionType.OnCandleBarClickand it does not work.
Version 10.0.0-alpha1
- 🆕 New features
- Support thousand separators and custom decimal folding.
- Rewrite the axis module, and customize the y-axis to support setting ranges.
- Add instance methods
setPrecision(precision),getPrecision(),setThousandsSeparator(thousandsSeparator),getThousandsSeparator(),setDecimalFold(decimalFold),getDecimalFold()andsetLoadMoreDataCallback(cb).
- 👉 Changes
- Chart api
init(dcs, options),positioninoptions.layoutchild changed toorder,formatDate(dateTimeFormat, timestamp, format, type)inoptions.customApichanged toformatDate(timestamp, format, type),options.thousandsSeparatorchanged to object{ sign, format },options.decimalFoldThresholdchanged tooptions.decimalFold. - Instance api
applyNewData(dataList, more, callback)changed toapplyNewData(dataList, more). - Instance api
updateData(data, callback)changed toupdateData(data). - Instance api
getBarSpace()return value changed to object. - The return value of the custom indicator
createTooltipDataSourcemethodvaluesis changed tolegends.
- Chart api
- 🗑 Deprecated
- Remove chart api
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 usegetFigureClass(name)instead. - Remove instance api
setPriceVolumePrecision(pricePrecision, volumePrecision), please usesetPrecision(precision)instead. - Remove instance api
applyMoreData(dataList, more, callback),setLoadDataCallback(cb)andloadMore(cb), please usesetLoadMoreDataCallback(cb)instead. - Remove instance api
getIndicatorByPaneId(paneId, name), please usegetIndicators(filter)instead. - Remove instance api
getOverlayById(id), please usegetOverlays(filter)instead. - Remove style configuration
yAxis.position,yAxis.type,yAxis.insideandyAxis.inside, please use the properties in the window configurationaxisinstead. For details, refer to the chart API init(dcs, options), the instance API createIndicator(value, isStack, paneOptions) and setPaneOptions(options). - Remove
overlay.rectTextfrom style configuration. - Remove
rectTextfrom built-in basic graphics, please usetextinstead.
- Remove chart api