4.0 is the last stable release.
API JavaDoc: https://pepstock-org.github.io/Charba/4.0.
Breaking changes
- remove
ResourcesType
andEntryPointStarter
classes as objects to initialize Charba.- There are 2 new entry points to initialize Charba:
Charba.enable()
orCharba.enable(boolean)
for embedded resourcesDeferredCharba.enable(Runnable)
orCharba.enable(Runnable, boolean)
for deferred resources
- There are 2 new entry points to initialize Charba:
- Drop Internet Explorer 11 support.
- remove
jsinterop-base
dependency. - rename
defaultColor
fromDefaults
global options tocolor
. - remove
DefaultFontItem
class, useDefaultFont
. - remove
generateLegend
method fromDefaults
class and fromIsChart
class because the prototype is not available anymore. - remove
updateScale
method fromDefaults
because is not available anymore. UsegetScale(AxisType type)
instead. - remove
isAnimating
method fromChartNode
class. - remove
getBorderWidth
method fromChartNode
class. - remove
getOuterRadius
method fromChartNode
class. - remove
getInnerRadius
method fromChartNode
class. - remove
getRadiusLength
method fromChartNode
class. - remove
getOffsetX
method fromChartNode
class. - remove
getOffsetY
method fromChartNode
class. - change
getLineWidths
andgetColumnWidths
methods ofLegendNode
class in order to return a list of doubles instead of a list of integers. - remove
fontSize
,fontStyle
,fontFamily
,lineHeight
and addcolor
property (to set font color) to the following options classes, because newFont
implementation must be used:Options
LegendLabels
Title
Tooltips
- change the chart events constructor using
ChartEventContext
which contains the chart and the native event. - remove
HORIZONTAL_BAR
item ofChartType
enumeration because the horizontal bar is not a chart type anymore. - rename
getDatasetMeta(int)
method togetDatasetItem(int)
in theIsChart
interface. - rename
getDatasets()
method togetElements()
in theDatasetItem
class. - rename
getMeta()
method togetDatasetItem()
in theDatasetPluginItem
class. - remove
render(UpdateConfiguration)
method has been removed because it is not available anymore on CHART.JS. - rename
Rectangle
options and configuration inBar
, inside theElements
node of the options and configuration. - change
fill
default option forLine
element fromFill.ORIGIN
toFill.FALSE
. - rename
showLines
property toshowLine
property for line and radar chart options and configuration. - remove
xPadding
andyPadding
properties fromTooltips
class for options and configuration, usePadding
instead. - change
xAlign
andyAlign
properties inTooltipModel
class which are returning aTooltipAlign
object instead of a string. - change
fullWidth
property tofullSize
inTitle
andLegend
classes for options and configuration. - rename
LegendAlign
class toElementAlign
in order to be able to use forTitle
options and configuration classes. - change
cutoutPercentage
property from double to string in order to manage a percentage[number]%
format in the options and configuration classes, for pie and doughnut charts. - remove
Event.TOUCHEND
item - change
padding
property toTitle
class for options and configuration in order to usePadding
object instead of an integer. - remove
AbstractChartsLifecycleListener
class. UseChartsLifecycleListener
interface where all methods has got the default now. - remove
DEFAULT_X_AXIS_ID
,DEFAULT_Y_AXIS_ID
andDEFAULT_SINGLE_AXIS_ID
constants fromScales
class, useDefaultScaleId
enumeration. - remove
getMinor
method fromIsDefaultTicks
interface and then fromDefaultTicks
andDefaultChartTicks
classes. - rename
DefaultMajorTickItem
class toDefaultMajor
. - remove
SingleScaleOptions
class because the radial linear axis is managed like the cartesian ones. - rename
MultiScalesOptions
class toScalesOptions
. - remove
getAxis
method fromIsDefaultScale
interface because the axis kind does not any default and, when not set, depends on scale id. - remove
setAxis
methods fromScale
andAxis
classes because it must be set when an axis is built. - remove
getXAxes
andsetXAxes
methods fromScales
classes, usegetAxes
andsetAxes
methods. - remove
getYAxes
andsetYAxes
methods fromScales
classes, usegetAxes
andsetAxes
methods. - move
beginAtZero
property from ticks to axis/scale. - move
min
property from ticks to axis/scale. - move
max
property from ticks to axis/scale. - move
reverse
property from ticks to axis/scale. - move
suggestedMax
property from ticks to axis/scale. - move
suggestedMin
property from ticks to axis/scale. - move
min
property from time object to axis/scale. - move
max
property from time object to axis/scale. - move
labels
property from tick (cartesian category) object to axis/scale. - move
startAngle
property fromPolarAreaOptions
class toRadialAxis
. - remove
getCartesianType()
method fromCartesianAxis
class, usegetAxis
method. - rename
CartesianAxisType
class toAxisKind
in order to manage axis type for radial linear and not only cartesian ones. - remove
fontSize
,fontStyle
,fontFamily
,lineHeight
and addcolor
property (to set font color) to the following options classes, because newFont
implementation must be used:PointLabels
ScaleLabel
Ticks
- remove the following classes because the ticks implementation is updated:
TickMinor
,IsDefaultMinorTick
,AbstractTick
,IsDefaultBaseTick
,DefaultTickItem
,DefaultMinorTickItem
,BaseTickMinor
andBaseTick
- rename
TickMajor
option class toMajor
. - rename
BaseTickMinor
configuration class renamed toMajor
. - remove
backdropPaddingY
andbackdropPaddingX
properties fromTicks
options andRadiaLinearTick
configuration. UsebackdropPadding
property. - rename
Gridlines
class toGrid
for options and configuration in order to keep it aligned with CHART.JS name spaces. - remove
zeroLineWidth
,zeroLineColor
,zeroLineBorderDash
andzeroLineBorderDashOffset
properties fromGrid
options and configuration classes. - rename
tickMarkLength
property totickLength
inGrid
configuration and options classes. - rename
offsetGridlines
property tooffset
inGrid
class for options and configuration. - remove
ScaleDistribution
enumeration. Use new scaleCartesianTimeSeriesAxis
, introduced in its place. - remove
TimeTickItem
class, useScaleTickItem
class. - add
getValueAsDate()
method toScaleTickItem
class in order to get the tick value asDate
. - rename
getValueAsDouble
method ofScaleTickItem
class togetValue
. - remove
getTimeTickItems
method fromScaleItem
class, usegetTickItems
. - remove
MarginsItem
,AxisMarginsItem
andAxisMinSizeItem
classes because they are not visible in CHART.JS anymore. - change
onCallback
method signature ofTimeTickCallback
class in order to get a list ofScaleTickItem
instead ofTimeTickItem
. - change
onAfterBuildTicks
method signature ofTimeAxisBuildTicksCallback
class in order to get a list ofScaleTickItem
instead ofTimeTickItem
. - remove the list of ticks as argument from
AxisBuildTicksCallback
class. - change
isoWeekday
property ofTime
options and configuration class does not store aboolean
anymore but newIsoWeekDay
enumeration with all days of week. - rename
ScaleLabel
class toScaleTitle
in order to keep it aligned with CHART.JS name spaces. - rename
CartesianScaleLabel
class toCartesianScaleTitle
in order to keep it aligned with CHART.JS name spaces. - rename
ScaleLabelAlign
enumeration class toScaleTitleAlign
in order to keep it align with CHART.JS names. - remove
ScaleLabelPadding
options, usePadding
instead. - remove
CartesianPadding
options, usePadding
instead. - rename
ScaleBounds
class toBounds
. - rename
labelString
property name totext
inScaleTitle
class for options and configuration. - rename
RadialPointLabelCallback
interface toPointLabelCallback
forRadialPointLabels
configuration. - add the index of the label to the signature of the
PointLabelCallback
interface method. - rename
steppedLine
from the dataset options tostepped
. - rename
tension
from the dataset option tolineTension
. - rename
SteppedLine
enumeration toStepped
. - rename
lineTension
property totension
inLiningDataset
class. - change
getXAxisID
andgetXAxisID
methods inLineDataset
class in order to return aIsScaleId
instance instead of aString
. - change
getXAxisID
andgetXAxisID
methods inBarDataset
class in order to return aIsScaleId
instance instead of aString
. - add
BarBorderWidthCallback
interface to use forborderWidth
andhoverBorderWidth
callbacks inBarDataset
class. - add
pointStyle
property toBarDataset
class. - add
borderRadius
property toPieDataset
andDoughnutDataset
classes. - enable the feature to manage floating bars on
time
ortimeseries
axes and bar charts adding toDataPoint
class the possibility to add aFloatingData
object asY
value. - remove
setT(Date)
andDate getT
methods fromDataPoint
class. UsesetX(Date)
andDate getXAsDate()
instead. - change
borderDashOffset
option from int to double in all classes where referenced. - reduce visibility of
setHidden
method ofDataset
class and add hidden argument toDataset
constructor in order to set the initial visibility. To change the dataset visibility, use thesetDatasetVisibility
chart method. - change the signatures of
Plugin
interface in order to manage new arguments of functions. - remove
easing
properties fromDatasetPluginItem
andTooltipPluginItem
classes because it is not provided anymore. - remove
ease
argument fromonBeforeDraw
,onAfterDraw
,onBeforeDatasetsDraw
,onAfterDatasetsDraw
,onBeforeDatasetDraw
andonBeforeDatasetDraw
methods ofPlugin
interface because is not passed by CHART.JS anymore. - add the update mode to the
onAfterDatasetsUpdate
,onAfterUpdate
,onBeforeDatasetsUpdate
, andonBeforeUpdate
methods ofPlugin
interface. - remove
AbstractPluginCachedOptions
andAbstractPluginCachedOptionsFactory
classes. Use instead callbacks cache. - change
AbstractPlugin
class, removing all methods leaving onlygetId
(because thePlugin
interface has got all default methods) and new constructor where the plugin id is mandatory. - remove
setEnabled
method forDefaultPluginId
enum fromPlugin
options class in order to avoid an inconsistent default options of plugin. UsesetDisplay
method for legend and title in legend and title options, andsetEnabled
method for tooltips in tooltips options. - change
getXAxisID
method inDatasetsItemsSelectorOptions
class in order to return aIsScaleId
instance instead of aString
. - rename
ClearSelection
class toSelectionCleaner
in theDatasetsItemsSelector
plugin.- rename
clearSelection
methods tocleanSelection
in theDatasetsItemsSelector
class. - rename
getClearSelection
method togetSelectionCleaner
in theDatasetsItemsSelectorOptions
class. - rename
DatasetRangeClearSelectionEvent
class toDatasetRangeCleanSelectionEvent
. - rename
DatasetRangeCleanSelectionEventHandler
class toDatasetRangeCleanSelectionEventHandler
. - rename
onClear
method toonClean
inDatasetRangeCleanSelectionEventHandler
class.
- rename
- remove
CLEAR_SELECTION
constant fromDatasetRangeSelectionEvent
class because the event is containing the selected values and not the indexes anymore. - remove
fontColor
property fromSelectionCleaner
options, usecolor
instead. - remove
fontSise
,fontStyle
andfontFamily
properties fromClearSelection
options, usefont
object instead. - change
LabelsPlugin
in order to :- add new
color
property for the font color, in order to be aligned with CHART.JS 3 implementation. - use
font
object instead of the single properties. - change
FontColorCallback
in favor ofColorCallback
where you can decide the color. - add
FontColorCallback
in favor ofFontCallback
where you can decide the whole content of font. - pass a
LabelsContext
object instance as argument to all plugin callbacks instead ofRenderItem
andFontColorItem
ones.
- add new
- remove
setOptions(List<T>)
,getOptionsAsList
andgetOptionsType
methods fromPlugins
configuration and options classes. - change
DataLabelsPlugin
in order to :- move
Weight
enumeration fromorg.pepstock.charba.client.datalabels.enums
toorg.pepstock.charba.client.enums
because newFont
implementation must be used. - remove
TextAlign
enumeration fromorg.pepstock.charba.client.datalabels.enums
and useTextAlign
inorg.pepstock.charba.client.enums
instead. org.pepstock.charba.client.datalabels.callbacks.ColorCallback
class have been replaced byorg.pepstock.charba.client.callbacks.ColorCallback
class to manage whatever scriptable option which manages colors.org.pepstock.charba.client.datalabels.callbacks.OffsetCallback
class have been replaced byorg.pepstock.charba.client.callbacks.OffsetCallback
class to manage whatever scriptable option which manages offsets.org.pepstock.charba.client.datalabels.callbacks.OffsetCallback
class have been replaced byorg.pepstock.charba.client.callbacks.OffsetCallback
class to manage whatever scriptable option which manages offsets.org.pepstock.charba.client.datalabels.callbacks.TextShadowColorCallback
class have been replaced byorg.pepstock.charba.client.callbacks.ColorCallback
class to manage whatever scriptable option which manages colors.org.pepstock.charba.client.datalabels.callbacks.TextStrokeColorCallback
class have been replaced byorg.pepstock.charba.client.callbacks.ColorCallback
class to manage whatever scriptable option which manages colors.org.pepstock.charba.client.datalabels.callbacks.TextStrokeWidthCallback
class have been replaced byorg.pepstock.charba.client.callbacks.WidthCallback
class to manage whatever scriptable option which manages line widths.org.pepstock.charba.client.datalabels.callbacks.PaddingCallback
class have been replaced byorg.pepstock.charba.client.callbacks.PaddingCallback
class to manage whatever scriptable option which padding.org.pepstock.charba.client.datalabels.callbacks.FontCallback
class have been replaced byorg.pepstock.charba.client.callbacks.FontCallback
class to manage whatever scriptable option which manages fonts.
- move
- rename
CompleteCallback
class toCompletedCallback
(and the name of the method fromonComplete
toonCompleted
) in theZoomPlugin
. - rename
getCompleteCallback
andsetCompletedCallback
methods togetCompleteCallback
andsetCompleteCallback
in theZoom
andPan
options in theZoomPlugin
. - change
ModeCallback
interface method signature adding new argument, the configuration element of theZoom
options. - remove
sensibility
,rangeMin
andrangeMax
properties fromZoom
configuration and options. - remove
speed
,rangeMin
andrangeMax
properties fromPan
configuration and options. - change signature for
Zoom
andPan
callbacks in order to be aligned with the other scriptable options, using only an argument, the context. - remove the generic definition from
AbstractConfigurationItem
class inZoomPlugin
. - remove
Range
class because is not longer used. UseLimit
andScaleLimit
instead. - remove
rangeMin
andrangeMax
properties fromZoom
andPan
configuration and options. UseLimit
andScaleLimit
instead. - rename
resetZoom
method inZoomPlugin
class toreset
. - change
Drag
class in order drag configuration is a inner element ofZoom
configuration instead of separated object.- remove all methods from
ZoomPlugin
class to set the drag object to zoom configuration.
- remove all methods from
- remove
animationDuration
property fromDrag
class inZoomPlugin
. - rename
enabled
property todisplay
inLineLabel
configuration ofAnnotationPlugin
. - move
AnnotationType
enumeration fromorg.pepstock.charba.client.annotation.enums
toorg.pepstock.charba.client.annotation
in order to maintain the low visibility of internal classes of the annotation plugin implementation. - rename
LineLablePosition
class toLablePosition
forLineLabel
configuration ofAnnotationPlugin
. - remove the feature to create custom controller without extending an existing one. You can only extend existing chart type.
- change
Controller
interface in order to be align with new interface implemented in new CHART.JS. - change the constructor signature of
ControllerType
class adding a mandatory argument ofControllerProvider
instance which can provide the instance of controller to register.- add an optional argument (boolean) in order to decide if the base default options of the chart which is being extended must be cloned or not.
- reduce the visibility of
register
method ofController
class
- rename
extend
method ofControllers
class toregister
. - remove
initialize
,draw
,linkScales
,update
,addElements
,setHoverStyle
andremoveHoverStyle
methods fromController
interface. - change
AbstractController
class in order to extend it only the the controller type and implementing only needed methods - remove
fontFamily
andfontStyle
properties from meter and gauge options, usefont
instead. - rename
GaugeThreshold
enumeration toDefaultThreshold
. - rename
MeterDisplay
enumeration toRender
and move fromorg.pepstock.charba.client.impl.charts
package toorg.pepstock.charba.client.enums
. - rename
displayFontColor
property tofontColor
in meter and gauge options - rename
animatedDisplay
property toanimated
in meter and gauge options - change the signature of
MeterFormatCallback
interface in order to get only aMeterContext
instance as argument. - change the structure of scriptable options context.
- remove
getIndex
method fromDatasetContext
class, use getDataIndex instead. - add type of the context.
- remove
isHover
method fromDatasetContext
class. - rename
options
property toattributes
in the context classes to store custom options at runtime.
- remove
- creates new context classes based on the type of context:
- create
ChartContext
class to map the context for configuration chart callbacks, type equals tochart
. - rename
ScriptableContext
class toDatasetContext
to map the context for configuration datasets callbacks,dataset
anddata
types ScaleContext
class to map the context for configuration scales callbacks,scale
andtick
types.DataLabelsContext
which is mappingdatalabels
types, for callbacks invoked byDataLabelsPlugin
.LabelsContext
which is mappinglabels
types, for callbacks invoked byDataLabelsPlugin
.AnnotationContext
which is mappingannotation
types, for callbacks invoked byAnnotationPlugin
.
- create
- all scriptable options are extending the
Scriptable
interface which has changed own signature, accessing only 1 argument, the context defined as generic. BackgroundColorCallback
andBorderColorCallback
classes have been replaced byColorCallback
class to manage whatever scriptable option which manages colors.BorderWidthCallback
class has been replaced byWidthCallback
class to manage whatever scriptable option which manages line widths.- rename
BorderCapStyleCallback
class toCapStyleCallback
. - rename
BorderJoinStyleCallback
class toJoinStyleCallback
. - remove
LegendCallback
interface and its usage fromConfigurationOptions
class because the prototype is not available anymore. - remove
hidden
attribute fromLegendItem
andLegendLabelItem
classes because not supported anymore. Use newisHidden(chart)
method ofLegendItem
class. - redesign of
TooltipModel
class in according with new Chart.js model. - rename
TooltipCustomCallback
class toTooltipExternalCallback
in order to keep it aligned with CHART.JS name spaces. - rename
getValue
andgetIndex
methods togetFormattedValue
andgetDataIndex
ones inTooltipItem
class in order to be aligned with new CHART.JS tooltip item interface. - change the return value of
getTooltip
method ofTooltipPluginItem
class, returning now aTooltipModel
object instead ofTooltipNode
. - remove
x
andy
properties fromTooltipItem
class. - remove
getEasing
method fromAnimationItem
class because is not provided anymore by new animation engine. - rename
HtmlLegendTextCallback
class toHtmlLegendItemCallback
. - rename
ValueCallback
toMeterFormatCallback
class.- rename
setValueCallback
andgetValueCallback
ofMeterOptions
class tosetFormatCallback
andgetFormatCallback
.
- rename
- change all properties of
BaseBoxItem
,SizeItem
,LegendHitBoxItem
classes fromint
todouble
. - reduces the visibility of
Gradient
andPattern
class constructors in order to use newGradientBuilder
andPatternBuilder
classes. This change avoids inconsistent gradient and pattern objects, improving some capabilities of them (like theequals
andhashCode
methods in case they will be needed).- adds
setColors
methods (getting a list or an array ofIsColor
) toGradientBuilder
in order to enable the gradient creation to theColorScheme
instances.
- adds
- change
toFont
method toUtilities
class in order to get the weight of the font. - remove
JsWindowHelper
class. UseWindow.enableResizeOnBeforePrint()
. - rename
UndefinedValues
class toUndefined
. - change the type for some properties of LuxonOptions class:
locale
is now aCLocale
object instead of a string.numberingSystem
is now aNumberingSystem
object instead of a string.zone
is now aTimeZone
object instead of a string.outputCalendar
is now aCalendar
object instead of a string.
- remove the usage of
Moment
as date library because it does not use the web internationalization. - remove the usage of
Date-fns
as date library because it does not use the web internationalization.
Features
- import CHART.JS version 3.3.2.
- import CHART.JS LUXON adapter version v1.0.0.
- import LUXON library version 1.27.0.
- import CHART.JS Datalabels plugin version v2.0.0-rc.1.
- import CHART.JS Annotation plugin version v1.0.2.
- import CHART.JS Zoom plugin version v1.0.1.
- add
backgroundColor
andborderColor
default options. - add
VerticalLine
chart, options and data set classes to manage this new kind of chart. - add
setDatasetVisibility
method toAbstractChart
class in order to set the visibility for a given data set. - add
toggleDataVisibility
method toAbstractChart
class in order to toggle the visibility of an item in all data sets. - add
isDataVisible
method toAbstractChart
class in order to get the stored visibility state of an data index for all data sets. - add
hide
method toAbstractChart
class in order to hide a data set. - add
show
method toAbstractChart
class in order to show a data set. - add
update(IsTransitionKey)
andreconfigure(IsTransitionKey)
methods toIsChart
interface in order to update the chart by an animation update mode. - add
resize(width height)
method toIsChart
interface. - add
newDataset(boolean)
methods for all charts (by newIsDatasetCreator
interface) in order to get new data set with the initial visibility status. - add
usePointStyle
property toTooltips
class for options and configuration. - add
boxWidth
andboxHeight
properties toTooltips
options and configuration classes. - add
xAlign
andyAlign
properties toTooltips
options and configuration classes. - improve the tooltip callbacks management providing the right defaults.
- add
borderWidth
,borderRadius
andborderDash
properties toTooltipLabelColor
item in order to improve the customization of tooltips by the callback. - add
title
property toLegend
options and configuration classes in order to manage a title on legend - add
maxWidth
andmaxHeight
properties toLegend
options and configuration. - add
boxHeight
property toLegendLabels
options and configuration classes. - add
textAlign
property toLegendLabels
options and configuration classes. - add
fontColor
property toLegendItem
andLegendLabelItem
classes. - add
events
property toLegend
andTooltips
options and configuration classes in order to enable the event filtering. - add
align
property toTitle
options and configuration classes. - add
hoverBackgroundColor
,hoverBorderWidth
andhoverBorderColor
properties toBar
,Arc
,Line
andPoint
elements configuration and options classes. - add
pointStyle
property toBar
element configuration and options classes. - add
enableBorderRadius
property toBar
element configuration and options classes. - add
hoverBorderRadius
property toBar
element configuration and options classes. - add
borderRadius
property toArc
element configuration and options classes. - add
hoverOffset
property toArc
element configuration and options classes. - add
Datasets
class in order to manage data sets options and configuration classes. - add
Interaction
class in order to manage data sets options and configuration classes. - implement
decimation
plugin options and configuration. - implement
filler
plugin options and configuration. - add
width
andheight
options toChartAreaNode
class - add
columnHeights
property toLegendNode
class. - add
grouped
property toDatasets
bar options and configuration. - implement new animation options and configuration for new engine:
- add new animation entities (collection of properties, transitions) and new name spaces where the options must be stored.
- add
delay
property to animation options. - add
loop
property to animation options. - add
animation
options and configuration to data sets. - add
animation
options and configuration to tooltips. - add
setAnimationEnabled
andisAnimationEnabled
methods to animation containers to configuration, options and data sets. - enable
duration
,delay
,loop
andeasing
properties as scriptable options inAnimation
configuration. - enable
from
andto
properties as scriptable options inAnimationsItem
configuration.
- add
skipNull
property toBarOptions
configuration. - change
circumference
androtation
properties onPieChart
andDoughnutChart
options in order to set the value in degrees instead of radians. - add
cutout
property in the options and configuration classes, for pie and doughnut charts. - add
radius
andradiusPercentage
properties in the options and configuration classes, for pie and doughnut charts. - add
resizeDelay
property to options and configuration. - add
setX
andsetY
methods toIsPadding
interface as shortcut to set X (left, right) and Y (top, bottom) dimensions. - add
color
,borderColor
,backgroundColor
andfont
properties to configuration of a single chart. - add
toBase64Image(ImageMimeType, double)
methods (and all combinations) toIsChart
interface in order to get the image form chart in different image format and with different image quality. - enable
padding
property as scriptable inLayout
configuration. - add
segment
property toLineOptions
options and configuration in order to manage the rendering of line segments. - enable
align
,display
,color
,font
,padding
,position
andtext
properties inTitle
configuration to be set as scriptable options. - enable the scriptable options activation by
NativeCallback
, a callback which contains java script code. - implement
setActiveElements
,getActiveElements
,setTooltipActiveElements
andgetTooltipActiveElements
methods on chart instances. - add axis id parameter to the cartesian axes classes constructor, by
IsScaleId
or a string. - add
getAxis(scaleId, axisKind)
method fromIsDefaultScale
s interface in order to get the default scale and removegetXAxis
andgetYAxis
methods. - improve the defaults management for scales.
- change visibility of
CartesianAxis
class, now it is public. - add
CartesianTimeSeriesAxis
class in order to manage time series scales. - add
backgroundColor
property toAxis
configuration andScale
options classes. - add
alignToPixels
property toAxis
configuration andScale
options classes. - add
singleStacked
property toCartesianAxis
configuration andScale
options classes. - add
labels
property toCartesianCategoryAxis
class. - add
minIndex
andmaxIndex
properties toCartesianCategoryAxis
class in order to manage minimum and maximum by index of the label, instead of its content. - add
beginAtZero
property toCartesianLogarithmicAxis
class. - add
suggestedMin
andsuggestedMax
properties toCartesianLogarithmicAxis
class. - add
grace
property to scale options and toCartesianLinearAxis
class. - add
animate
property toRadialAxis
configuration andScale
options classes. - add
align
property toScaleTitle
options andCartesianScaleTitle
configuration classes. - add
tickBorderDash
property toGrid
configuration and options classes. - add
tickBorderDashOffset
property toGrid
configuration and options classes. - add
tickColor
property toGrid
configuration and options classes. - add
tickWidth
property toGrid
configuration and options classes. - add
borderColor
andborderWidth
properties toGrid
options and configuration classes. - add
WidthCallback
interface toGrid
andRadialAngleLines
configuration in order to setlineWidth
property at runtime. - add
ColorCallback
interface toGrid
,RadialAngleLines
andRadialLinearTick
configuration in order to setcolor
andbackdropColor
property at runtime. - add
BorderDashOffsetCallback
interface toGrid
andRadialAngleLines
configuration in order to setborderDashOffset
property at runtime. - add
BorderDashCallback
interface toRadialAngleLines
configuration in order to setborderDash
property at runtime. - add
FontCallback
interface toRadialPointLabels
andTick
configuration in order to setfont
property at runtime. - add
ShowLabelBackdropCallback
interface toTick
configuration in order to setshowLabelBackdrop
property at runtime. - add
count
property toRadialLinearTick
,CartesianLinearTick
andTick
configuration classes. - add
backdropPadding
,backdropColor
andshowLabelBackdrop
properties toTick
configuration, for all ticks. - add
SimplePaddingCallback
interface toRadialPointLabels
configuration in order to setpadding
property at runtime. - add
format
property to all numeric ticks (cartesian linear and log, radial linear) in order to apply the number formatting by ECMAScript Internationalization API, leveraging on Charba INTL NumberFormat implementation. - add the
center
axes position and the position of the axis with respect to a data value. - add
textStrokeColor
andtextStrokeWidth
properties toTicks
configuration and options classes. - add
includeBounds
,align
andcrossAlign
properties to cartesian ticks. - add multiple text lines for
text
property ofScaleTitle
class. - add
backdropColor
,backdropPadding
andpadding
properties toPointLabels
options andRadialPointLabels
configuration classes. - add the selected value of the scale by the click event to the
AxisClickEvent
class. - add the following methods to
ScaleItem
class in order to improve the interaction with scale elements:getDecimalForPixel
getPixelForDecimal
getPixelForTick
getLabelForValue
getPixelForValue
getPixelForValue
getValueForPixel
getBaseValue
getBasePixel
- enable
precision
,maxTicksLimit
andstepSize
scriptable options to linear ticks. - add
clip
property to all datasets types. - add
spanGaps
number property (double) toLiningDataset
class in order to manage the value where there are some gaps. - add
setXAxisID
andsetYAxisID
methods toLineDataset
class in order to set the scale id usingIsScaleId
implementation. - add
stack
item toFill
enumeration. - add
indexAxis
property toBarDataset
andBarOptions
classes in order to manage the horizontal bars. - add
START
andEND
items toBorderSkipped
enumeration - change
borderSkipped
property inBarDataset
class in order to manage it as indexable options. - change
borderWidth
property forBarDataset
in order to be set as indexable when set as an object. - add
borderRadius
andhoverBorderRadius
properties toBarDataset
class. - add
base
property toBarDataset
configuration and toDatasets
configuration and options classes. - add
enableBorderRadius
property toBarDataset
configuration class. - add
setXAxisID
andsetYAxisID
methods toBarDataset
class in order to set the scale id usingIsScaleId
implementation. - add
offset
andhoverOffset
properties toPieDataset
andDoughnutDataset
classes. - change
borderAlign
property forPieDataset
,PolarAreaDataset
andDoughnutDataset
in order to be set as indexable. - enable overriding the legend
pointStyle
(from dataset) using newpointStyle
option. - improve the gradients and patterns management at dataset level in order to be managed by a callback instead of by a plugin in order to have the right chart area size for gradients.
- add
grouped
property toBarDataset
class. - add
rotation
andcircumference
properties toPieDataset
andDoughnutDataset
classes. - change all methods of
Plugin
interface becoming all default ones. - add new hooks to
Plugin
interface:onBeginDrawing
andonEndDrawing
in order to invoke the plugin once before starting and after ending any drawing.onBeforeElementsUpdate
onReset
in order to enable to catch when a chart is resetting.onInstall
,onStart
,onStop
,onUninstall
to manage plugin life-cycle.onBeforeDataLimits
,onAfterDataLimits
,onBeforeBuildTicks
,onAfterBuildTicks
to manage scale setup.
- add
events
property toAbstractPluginOptions
options classes in order to enable the event filtering for plugin. - improve the code of
HtmlLegend
plugin in order to manage texts (for legend items and title) in the same way. - manage new legend title in
HtmlLegend
plugin.- add
HtmlLegendTitleCallback
callback to apply a custom legend title in HTML. - rename
HtmlLegendTextCallback
callback toHtmlLegendItemCallback
.
- add
- improve
Annotation
plugin in order to leverage on callbacks cache which enables the complete configuration also at default or chart type levels. - add new features to
AnnotationPlugin
plugin.- add
setXScaleID
andsetYScaleID
methods toBoxAnnotation
class of Annotation plugin in order to set the scale id usingIsScaleId
implementation. - add
setScaleID
method toLineAnnotation
class of Annotation plugin in order to set the scale id usingIsScaleId
implementation. - implement only
click
,dblclick
,enter
andleave
events. - add
ellipse
andpoint
annotation types. - add
display
property to all annotations in order to enable or disable the display of annotation. - remove
mode
property from annotation line options because new plugin is using theaxis
property of scales for line orientation. - remove
events
property from annotation options because the event listeners will be added based on the callbacks definitions. - add
autoRotation
property to annotation line label options in order to enable the automatic calculation of label rotation. - add
textAlign
property to annotation line label options in order to enable horizontal alignment when context text is multiple lines. - remove
name
property from annotation options because is not needed anymore. Useid
property instead. - change
getScaleID
method inLineAnnotation
class of Annotation plugin in order to return aIsScaleId
instance instead of aString
. - change
getXScaleID
andgetXScaleID
methods inBoxAnnotation
class of Annotation plugin in order to return aIsScaleId
instance instead of aString
. - change the constructors of
LineAnnotation
andBoxAnnotation
in order to set an ID to the object. This will enable the possibility to define annotations items as default. - enable the callback definitions for all scriptable options in all annotations.
- add
drawTime
property toLineLabel
configuration ofAnnotationPlugin
. - add
adjustScaleRange
options to all annotations element.
- add
- add
enabled
property toDatasetsItemsSelector
plugin in order to disable/enable the plugin at runtime. - add
setXAxisID
method toDatasetsItemsSelectorOptions
class in order to set the scale id usingIsScaleId
implementation. - add new
DatasetRangeClearSelectionEvent
event forDatasetsItemsSelector
plugin in to order to notify when a clear action has been performed on chart.- remove
fireEventOnClearSelection
properties has been removed from DatasetsItemsSelectorOptions class because an clear selection event will fire only if there is a event handler.
- remove
- improve the logic of
DatasetsItemsSelector
plugin in order to leverage on new capabilities of scale item to retrieve the selected data instead of the index. - improve
DataLabels
plugin in order to leverage on callbacks cache which enables the complete configuration also at default or chart type levels. - improve
DataLabelsOptionsBuilder
class in order to manage the multi-labels configuration. - improve
Labels
plugin in order to leverage on callbacks cache which enables the complete configuration also at default or chart type levels. - improve
LabelsOptionsBuilder
class in order to manage the multi-labels configuration. - improve
Zoom
plugin in order to leverage on callbacks cache which enables the complete configuration also at default or chart type levels. - add
RejectedCallback
class toZoom
andPan
options in theZoomPlugin
in order to manage the event when pan or zoom fail because modifier key was not detected. - add
StartCallback
class toZoom
andPan
options in theZoomPlugin
in order to manage the event when pan or zoom are about to start. - add
wheelModifierKey
property toZoom
options in theZoomPlugin
in order to enable zoom only when modifier key was detected. - add
overScaleMode
property toZoom
andPan
options in theZoomPlugin
in order to enable zoom only when modifier key was detected. - add
Limit
andScaleLimit
configuration element toZoomOptions
configuration. - add
Drag
,Wheel
andPinch
elements inZoom
configuration and options. - add
threshold
property toWheel
configuration and options. - add
modifierKey
property toPan
andWheel
options in theZoomPlugin
in order to enable pan and wheel only when modifier key was detected. - add new
reset(IsChart, IsTransitionKey)
API methods to theZoomPlugin
class in order to set the update mode of updating chart. - add new
zoom
,pan
andzoomScale
API methods (with different signatures) to theZoomPlugin
class in order to pan and zoom on chart programmatically. - add
ZOOM_TRANSITION_MODE
constant to theZoomPlugin
class in order to get the custom transition mode provided by the plugin out-of-the-box. - implement new
Controller
interface in order to have methods before and after CHART.JS chart phases:- initialize
- draw
- linkScales
- update
- parse
- implement easing value management for
Meter
andGauge
charts (and their controller) because in the new version of CHART.JS, easing value is not provided anymore. - add
ControllerRegistrationHandler
interface to set to aControllerType
constructor in order to enable the notification before and after the controller registration to CHART.JS. - add
autoFontSize
property to meter and gauge options in order to enable or disable auto calculation of font size and use the font size provided by the user. - add
NONE
item in theRender
enumeration in order to disable the label rendering in meter and gauge charts. - enable
fontColor
property to be set by callback in meter and gauge charts. - add
dataPoint
property toTooltipItem
class. - add
onLabelPointStyle
method toTooltipLabelCallback
interface andTooltipLabelPointStyle
class in order to manage the point style in tooltip. - create
ItemSortCallback
interface in order to be extended by legend and tooltip callback interfaces. - add
sort
callback (byLegendItemSortCallback
class) to theLegendLabels
configuration in order to sort the legend items. - move
width
andheight
options toBaseBoxitem
class. - add
checkAndGetValue
static method toIsColor
class. - remove static cache for canvas patterns and gradients creation, going to a cache for each canvas object factory in order that every factory must manage own objects.
- add
toFont
method toUtilities
class in order to get aFont
object as parameter. - add the following properties to
RegExp
class;lastIndex
(static)dotAll
global
ignoreCase
multiline
source
sticky
unicode
- add
groups
method toRegExpResult
in order to get the object to refer to certain token by string that a regular expression matches. - add
CScheduler
class in order to provide asynchronous and delayed task scheduling. - add
CTimer
class in order to provide asynchronous and repeatedly task scheduling. - add
locale
property to options and configuration. - implement INTL NumberFormat of ECMAScript Internationalization API.
- implement
CLocale
class to manage locale objects. - implement the retrieving of locale from query string,
<meta>
element (as GWT is doing) or from navigator instance.
- implement
- implement INTL DateTimeFormat of ECMAScript Internationalization API.
- change the default date adapter library, using as default
Luxon
instead ofMoment
in order to enable I18N by default. - change the
Adapter
options and configuration of time axis in order to get a date adapter options (LUXON options) bydate
property.
Development
- change dependency for Google Closure Compiler, version v20210406.
- change dependency for GWT Web toolkit, version 2.9.0.
- change visibility of
AbstractModel
class, now it is public. - add
@Override
annotation to all overriding methods. - change the registering of tooltips positioner in order to apply to CHART.JS tooltips plugin.
- override the hashCode
$H
property forNativeObject
objects that GWT is adding to objects in order to set the property as NOT enumerable and NOT configurable. - change
compare
static method ofKey
interface in order to test if the keys are valid and not only notnull
. - add
JsPluginHelper
class in order to use CHART.JS registry feature to manage plugins. - create a controller template code generator and add a specific target in
build.xml
. - reintroduce the
Findbugs
project in order to check the bugs on project. - reduce the visibility of objects which must get a javascript native object as argument on constructor, using an envelop. This reduces the possibility to map a native object with a wrong wrapper.
- remove
D
dataset type fromAbstractChart
class byIsDatasetCreator
interface. - rename the controller id for
Meter
andGauge
charts addingcharba
prefix in order to avoid overlapping with possible other controllers withmeter
andgauge
ids. Window.enableResizeOnBeforePrint()
method has been fully implemented by JSINTEROP.- reduce visibility of property handler classes leveraging on the interface.
- implement
ImmutableDate
class to use to return the date value stored to chart configuration and to callbacks. - add
equals
andhashCode
methods to standard keys implementation inoptions
package. - add
BaseLocation
andBaseNavigator
native object classes to get the location and navigator fromDOM
. - add
Meta
native object class to map a<meta>
element fromDOM
document. - add
boolean has(Object,String)
method toJsHelper
class in order to check if a property (by its key) belongs to an object or not. THis is done because CHART.JS merges objects withoutprototype
, for security reason. - improve the visibility and reuse of the native object factories in order to have only 1 static instance from the object which must be created.
- improve the management of properties used cross classes or packages.
- use new location for legend, title and tooltips options, in
plugins
options node. - enable CI by GitHub Action, disabling Travis.
- change GitHub Action workflow in order to use
JDK11
to compile the project and installNodeJs12
in order to be compliant with new restrictions ofSonarCloud
.That means that Charba is compilable also onJDK11
but it will be release onJDK8
in order to be consumed by applications which are still usingJDK8
.
- change GitHub Action workflow in order to use
- fix font and color fallbacks to the defaults values.
- re-factor the
configuration
package in order to manage both configuration and chart options (at runtime). - change the
NativeObject
from a class to an empty interface in order to skipClassCastException
in J2CL when the object, passed from CHART.JS, doesn't have any prototype or is a proxy. - add methods to
NativeObjectContainer
in order to manage a unique internal ID, as string. - add image mime type and image quality to
toDataUrl
methods (with all combination and defaults) toCanvas
object. - deploy javadoc (of all version) to GitHub Pages of Charba project.
- deploy new documentation (with 3.3 and 4.0 versions, based on Docusaurus) to GitHub Pages of Charba-Wiki project.
- deploy GWT showcase to GitHub Pages of Charba-Showcase project.
- deploy J2CL showcase to GitHub Pages of Charba-Showcase-J2CL project.