pepstock-org / Charba
Programming Languages
Projects that are alternatives of or similar to Charba
Charba - J2CL and GWT Charts library based on CHART.JS
What's Charba
GWT Web toolkit doesn't have charting library available out of the box.
There are some open source charting libraries for GWT available to be used but with some constraints or unclear items:
- internet connection needed
- open source license not completely clear, sometimes with some obligations like to add specific labels
- old packages not longer maintained
For all these reasons, Charba has been developed, leveraging on Chart.JS capabilities which are now available to GWT developers.
Not only GWT
Even if Charba was born only as GWT chart library, since version 3, Charba has been changed in order to be used not only in GWT but also with other DOM frameworks, base on J2CL - JavaToClosure, like Google Elemental2 or Elemento.
Since version 3, Charba has got an own DOM tree manager which allows to it to be independent from any other DOM tree frameworks (i.e. GWT, Elemental2 or Elemento) but it is providing a set of hooks in order to use it also over those frameworks.
Building
To build Charba, you can check out the project and to run Ant build.xml.
The Ant build.xml is able to build the 2 artifacts, related to the 2 distributions available.
The first distribution is a Charba file without any GWT dependency (but working on GWT anyway), consumable also in other J2CL - JavaToClosure frameworks, like Google Elemental2 and Elemento.
To build the project, execute buildBinary
target.
It creates a charba-[version.release].jar
file in dist
folder, ready to be included in your project.
The second distribution is a Charba file with a hard GWT dependency which contains charts widgets and code splitting capabilities.
To build the project, execute buildBinaryGwt
target.
It creates a charba-[version.release]-gwt.jar
file in dist
folder, ready to be included in your project.
Installation
Currently Charba is available on MVN repository.
It is available also on GitHub releases.
If you are using Apache Maven:
<dependency>
<groupId>org.pepstock</groupId>
<artifactId>charba</artifactId>
<version>3.3</version>
<!-- for GWT -->
<version>3.3-gwt</version>
</dependency>
If you are using Apache Ivy:
<dependency org="org.pepstock" name="charba" rev="3.3"/>
<!-- for GWT -->
<dependency org="org.pepstock" name="charba" rev="3.3-gwt"/>
If you are using Gradle:
compile group: 'org.pepstock', name: 'charba', version: '3.3'
compile group: 'org.pepstock', name: 'charba', version: '3.3-gwt'
To install in your GWT project, both for GWT and for J2CL artifacts, you must the following configuration in your GWT project module configuration:
...
<inherits name="org.pepstock.charba.Charba"/>
...
Charba version 1.x is based on JSNI method to integrate java script objects.
Since version 2.x, Charba is based on JSINTEROP method to integrate java script objects.
As the name suggests, JsInterop is a way of interoperating Java with JavaScript. It offers a better way of communication between the two using annotations instead of having to write java script in your classes (using JSNI).
PAY ATTENTION that if you are using a Charba version between 2.0 and 3.0 (included), GWT compiler (you are using for your project) requires -generateJsInteropExports
to be passed.
If you are using Apache Maven:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
...
<configuration>
<generateJsInteropExports>true</generateJsInteropExports>
</configuration>
</plugin>
Since Charba version 3.1, this is NOT needed anymore.
Documentation
All Charba documentation will be maintained in GitHub wiki of Charba project.
API JavaDoc is published here.
Showcase
See Charba showcase on GWT to have a look what you can do with it.
See also Charba showcase GWT source code on GitHub as starting point, if you are going to use on GWT.
See Charba showcase built by J2CL and based on Google Elemental2, to have a look what you can do with it.
See also Charba showcase J2CL source code on GitHub as starting point, if you are going to use on J2CL.
The samples are going to reflect what CHART.JS samples are showing here.
Continuous integration and quality gate
Charba is continuously built at every commit and merge in master
by Travis.
At every build, Charba is also checked by Sonar.io in order to have the pulse of its quality.
In the project, it's also provided the FindBugs project to looking offline for bugs.
Going to next release
Here you can find the list of enhancements and updates available on master
branch before which will be part of new official release:
Breaking changes
- changes by new CHART.JS version:
- Drop Internet Explorer 11 support.
- 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. - remove
isHover
method fromScriptableContext
class. - remove
getXAxes
andsetXAxes
methods fromScales
classes, usegetAxes
andsetAxes
methods. - remove
getYAxes
andsetYAxes
methods fromScales
classes, usegetAxes
andsetAxes
methods. - rename
steppedLine
from the dataset options tostepped
. - rename
tension
from the dataset option tolineTension
. - rename
defaultColor
fromDefaults
global options tocolor
. - change structure of dataset elements.
- rename
SteppedLine
enumeration toStepped
. - 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. - remove
getCartesianType()
method fromCartesianAxis
class, usegetAxis
method. - remove
DEFAULT_X_AXIS_ID
,DEFAULT_Y_AXIS_ID
andDEFAULT_SINGLE_AXIS_ID
constants fromScales
class, useDefaultScaleId
enumeration. - move
Weight
enumeration fromorg.pepstock.charba.client.datalabels.enums
toorg.pepstock.charba.client.enums
because newFont
implementation must be used. - 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
PointLabels
ScaleLabel
Ticks
- remove
fontSize
,fontStyle
,fontFamily
,lineHeight
and addcolor
property (to set font color) to the following configuration classes, because newFont
implementation must be used:LegendLabels
Title
Tooltips
PointLabels
CartesianScaleLabel
Ticks
- change
toFont
method toUtilities
class in order to get the weight of the font. - remove
DefaultFontItem
class, useDefaultFont
. - remove the following classes because the ticks implementation is updated:
-
TickMinor
,IsDefaultMinorTick
,AbstractTick
,IsDefaultBaseTick
,DefaultTickItem
,DefaultMinorTickItem
,BaseTickMinor
andBaseTick
-
- remove
getMinor
method fromIsDefaultTicks
interface and then fromDefaultTicks
andDefaultChartTicks
classes. - rename
TickMajor
option class toMajor
. - rename
DefaultMajorTickItem
class toDefaultMajor
. - rename
BaseTickMinor
configuration class renamed toMajor
. - remove
zeroLineWidth
,zeroLineColor
,zeroLineBorderDash
andzeroLineBorderDashOffset
properties fromGridLines
options and configuration classes. - remove
x
andy
properties fromTooltipItem
class. - change
setHoverStyle
andremoveHoverStyle
methods ofController
interface now additionally take thedatasetIndex
andindex
as arguments. - change the chart events constructor using
ChartEventContext
which contains the chart and the native event. - remove
generateLegend
method fromDefaults
class and fromIsChart
class because the prototype is not available anymore. - remove
LegendCallback
interface and its usage fromConfigurationOptions
class because the prototype is not available anymore. - remove
easing
properties fromDatasetPluginItem
andTooltipPluginItem
classes because it is not provided anymore. - remove
HORIZONTAL_BAR
item ofChartType
enumeration because the horizontal bar is not a chart type anymore. - remove
updateScale
method fromDefaults
because is not available anymore. UsegetScale(AxisType type)
instead. - redesign of
TooltipModel
class in according with new Chart.js model. - remove
ScaleDistribution
enumeration. Use new scaleCartesianTimeSeriesAxis
, introduced in its place. - remove
ease
argument fromonBeforeDraw
,onAfterDraw
,onBeforeDatasetsDraw
,onAfterDatasetsDraw
,onBeforeDatasetDraw
andonBeforeDatasetDraw
methods ofPlugin
interface because is not passed by CHART.JS anymore. - remove
hidden
attribute fromLegendItem
andLegendLabelItem
classes because not supported anymore. Use newisHidden(chart)
method ofLegendItem
class. - change
Controller
interface in order to be align with new interface implemented in new CHART.JS. - 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
. - 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
getEasing
method fromAnimationItem
class because is not provided anymore by new animation engine. - 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
Rectangle
options and configuration inBar
, inside theElements
node of the options and configuration. - rename
showLines
property toshowLine
property for line and radar chart options and configuration. - add
usePointStyle
property toTooltips
class for options and configuration. - add the update mode to the
onAfterDatasetsUpdate
,onAfterUpdate
,onBeforeDatasetsUpdate
, andonBeforeUpdate
methods ofPlugin
interface. - change the structure of scriptable options context.
- remove
getIndex
method fromScriptableContext
class, use getDataIndex instead. - add type of the context.
- remove
- change
fill
default option forLine
element fromFill.ORIGIN
toFill.FALSE
. - change the signatures of
Plugin
interface in order to manage new arguments of functions. - rename
lineTension
property totension
inLiningDataset
class. - rename
tickMarkLength
property totickLength
inGridLines
configuration and options classes.
- 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
. - change
getXAxisID
method inDatasetsItemsSelectorOptions
class in order to return aIsScaleId
instance instead of aString
. - remove
Event.TOUCHEND
item - rename
LegendAlign
class toElementAlign
in order to be able to use forTitle
options and configuration classes. - rename
CartesianAxisType
class toAxisKind
in order to manage axis type for radial linear and not only cartesian ones. - remove
MarginsItem
,AxisMarginsItem
andAxisMinSizeItem
classes because they are not visible in CHART.JS anymore. - remove
setAxis
methods fromScale
andAxis
classes because it must be set when an axis is built. - remove the feature to create custom controller without extending an existing one. You can only extend existing chart type.
- rename
extend
method ofControllers
class toregister
. - 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. - remove
setT(Date)
andDate getT
methods fromDataPoint
class. UsesetX(Date)
andDate getXAsDate()
instead. - 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
. - 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. - remove
render(UpdateConfiguration)
method has been removed because it is not available anymore on CHART.JS. - remove
JsWindowHelper
class. UseWindow.enableResizeOnBeforePrint()
. - rename
HtmlLegendTextCallback
class toHtmlLegendItemCallback
. - remove
CLEAR_SELECTION
constant fromDatasetRangeSelectionEvent
class because the event is containing the selected values and not the indexes anymore. - remove chartjs/chartjs-plugin-annotation because it's unmaintained. New Charba annotation plugin has been developed, completely in Java, with the same capabilities.
- 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
- rename
ValueCallback
toMeterFormatCallback
class.- rename
setValueCallback
andgetValueCallback
ofMeterOptions
class tosetFormatCallback
andgetFormatCallback
.
- rename
- 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. - add
BarBorderWidthCallback
interface to use forborderWidth
andhoverBorderWidth
callbacks inBarDataset
class. - rename
getDatasetMeta(int)
method togetDatasetItem(int)
in theIsChart
interface. - rename
getDatasets()
method togetElements()
in theDatasetItem
class. - rename
getMeta()
method togetDatasetItem()
in theDatasetPluginItem
class. - 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
- remove
AbstractPluginCachedOptions
andAbstractPluginCachedOptionsFactory
classes. Use instead callbacks cache. - change
LabelsPlugin
in order to :- add new
color
property for the font color, in order to be aligned with CHART.JS 3 implementation. - change
FontColorCallback
in favor ofColorCallback
where you can decide the font color. - use
font
object instead of the single properties. - add
FontColorCallback
in favor ofFontCallback
where you can decide the whole content of font. - pass a
Context
object instance as argument to the callback instead ofRenderItem
andFontColorItem
ones.
- add new
- 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. - change
borderDashOffset
option from int to double in all classes where referenced.
Features
-
import last CHART.JS version, version 3.0.0-beta7 on December 10th, 2020.
- add
setDatasetVisibility
method toAbstractChart
class in order to set the visibility for a given dataset. - add
toggleDataVisibility
method toAbstractChart
class in order to toggle the visibility of an item in all datasets. - add
isDataVisible
method toAbstractChart
class in order to get the stored visibility state of an data index for all datasets. - add
hide
method toAbstractChart
class in order to hide a dataset. - add
show
method toAbstractChart
class in order to show a dataset. - add axis id parameter to cartesian axes classes constructor.
- add
toFont
method toUtilities
class in order to get aFont
object as parameter. - add
align
property toScaleLabel
options andCartesianScaleLabel
configuration classes. - add
borderColor
andborderWidth
properties toGridLines
options and configuration classes. - add
ScaleLineWidthCallback
interface toGridLines
orRadialAngleLines
configuration in order to setlineWidth
property at runtime. - add
ScaleColorCallback
interface toGridLines
,RadialAngleLines
orRadialLinearTick
configuration in order to setcolor
andbackdropColor
property at runtime. - add
ScaleBorderDashOffsetCallback
interface toGridLines
orRadialAngleLines
configuration in order to setborderDashOffset
property at runtime. - add
ScaleBorderDashCallback
interface toRadialAngleLines
configuration in order to setborderDash
property at runtime. - add
ScaleFontCallback
interface toRadialPointLabels
orTick
configuration in order to setfont
property at runtime. - add
ScaleShowLabelBackdropCallback
interface toRadialLinearTick
orTick
configuration in order to setshowLabelBackdrop
property at runtime. - add
boxHeight
property toLegendLabels
options and configuration classes. - add
title
property toLegend
options and configuration classes in order to manage a title on legend - add
align
property toTitle
options and configuration classes. - add
boxWidth
andboxHeight
properties toTooltips
options and configuration classes. - add
Datasets
class in order to manage datasets options and configuration classes. - add
START
andEND
items toBorderSkipped
enumeration - add
width
andheight
options toChartAreaNode
class - add
onReset
method toPlugin
interface in order to enable to catch when a chart is resetting. - add
spanGaps
number property (double) toLiningDataset
class in order to manage the value where there are some gaps. - add
indexAxis
property toBarDataset
andBarOptions
classes in order to manage the horizontal bars. - add
clip
property to all datasets types. - add
CartesianTimeSeriesAxis
class in order to manage time series scales. - add
dataPoint
property toTooltipItem
class. - 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. - implement new animation options and configuration for new engine:
- add new animation entities (property, collection of properties, mode)
- add
delay
property to animation options. - add
debug
property to animation options. - add
loop
property to animation options. - add
animation
options and configuration to datasets. - add
animation
options and configuration to tooltips. - add
setAnimationEnabled
andisAnimationEnabled
methods to animation containers to configuration, options and datasets.
- add
update(IsAnimationModeKey)
andreconfigure(IsAnimationModeKey)
methods toIsChart
interface in order to update the chart by an animation mode. - add
ConfigurationAnimationCallback
interface in order to create the animation configuration at runtime at chart configuration. - add
TooltipsAnimationCallback
interface in order to create the animation configuration at runtime at tooltips configuration. - add
DatasetAnimationCallback
interface in order to create the animation configuration at runtime at dataset configuration. - change
borderSkipped
property inBarDataset
class in order to manage it as indexable options. - add
offset
andhoverOffset
properties toPieDataset
andDoughnutDataset
classes. - add
minIndex
andmaxIndex
properties toCartesianCategoryAxis
class in order to manage minimum and maximum by index of the label, instead of its content. - add
labels
property toCartesianCategoryAxis
class. - add
stack
item toFill
enumeration. - change
borderAlign
property forPieDataset
,PolarAreaDataset
andDoughnutDataset
in order to be set as indexable. - change
borderWidth
property forBarDataset
in order to be set as indexable when set as an object. - add
maxWidth
andmaxHeight
properties toLegend
options and 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
sort
callback (byLegendItemSortCallback
class) to theLegendLabels
configuration in order to sort the legend items. - add
beginAtZero
property toCartesianLogarithmicAxis
class. - add
locale
property to options and configuration. - 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
borderRadius
andhoverBorderRadius
properties toBarDataset
class. - add
suggestedMin
andsuggestedMax
properties to cartesian logarithmic axes. - add
align
andcrossAlign
properties to cartesian ticks. - add the
center
axes position and the position of the axis with respect to a data value. - enable overriding the legend
pointStyle
(from dataset) using newpointStyle
option. - add
onLabelPointStyle
method toTooltipLabelCallback
interface andTooltipLabelPointStyle
class in order to manage the point style in tooltip. - add
backgroundColor
andborderColor
default options. - add new hooks to
Plugin
interface:-
onInstall
,onStart
,onStop
,onUninstall
to manage plugin life-cycle. -
onBeforeDataLimits
,onAfterDataLimits
,onBeforeBuildTicks
,onAfterBuildTicks
to manage scale setup.
-
- add
resize(width height)
method toIsChart
interface. - add
textStrokeColor
andtextStrokeWidth
properties toTicks
configuration and options. - add
Interaction
class in order to manage datasets options and configuration classes.
- add
- add
setScaleID
method toLineAnnotation
class of Annotation plugin in order to set the scale id usingIsScaleId
implementation. - add
setXScaleID
andsetYScaleID
methods toBoxAnnotation
class of Annotation plugin in order to set the scale id usingIsScaleId
implementation. - add
setXAxisID
andsetYAxisID
methods toLineDataset
class in order to set the scale id usingIsScaleId
implementation. - add
setXAxisID
andsetYAxisID
methods toBarDataset
class in order to set the scale id usingIsScaleId
implementation. - add
setXAxisID
method toDatasetsItemsSelectorOptions
class in order to set the scale id usingIsScaleId
implementation. - add
getAxis(scaleId, axisKind)
method fromIsDefaultScale
s interface in order to get the default scale and removegetXAxis
andgetYAxis
methods. - add
onBeginDrawing
andonEndDrawing
methods toPlugin
interface in order to invoke the plugin once before starting and after ending any drawing. - add
linkScales
andbuildOrUpdateElements
methods to Controller interface in order to have the complete mapping of CHART.JS controller interface. - add
newDataset(boolean)
methods for all charts (by newIsDatasetCreator
interface) in order to get new dataset with the initial visibility status. - 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
- manage new legend title in
HtmlLegend
plugin.- add
HtmlLegendTitleCallback
callback to apply a custom legend title in HTML. - rename
HtmlLegendTextCallback
callback toHtmlLegendItemCallback
.
- add
- add the selected value of the scale by the click event to the
AxisClickEvent
class. - add new Charba annotation plugin, completely in Java, in order to replace chartjs/chartjs-plugin-annotation because it's unmaintained.
- does not implement all event callbacks previously implemented in chartjs/chartjs-plugin-annotation, only click, enter and leave events are implemented and not by callbacks but by event handlers.
- remove
mode
property from annotation line options because new plugin is using theaxis
property of scales for line orientation. - remove
doubleClickSpeed
property from annotation options because double click event is not supported anymore. - 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. - 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
. - 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. - change the constructors of
LineAnnotation
andBoxAnnotation
in order to set an ID to the object. This will enable the possibility to defines annotations items as default. - add
enabled
property to annotation line and box options in order to enable and disable the drawing of the annotation. - add
hoverCursor
property to line and box annotation options in order to change the cursor when mouse hovers the annotation. - add
Pattern
andGradient
as possiblebackgroundColor
property inBoxAnnotation
options. - add
AnnotationValueCallback
interface in order to configure Line and box annotation options to calculate the values to draw the annotation at runtime.
- 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
- import Datalabels plugin from a pepstock-org/chartjs-plugin-datalabels fork where the plugin has been changed in order to work with CHART.JS 3. This is a temporary solution waiting for the upgrade of the original plugin by the community.
- 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. - change all methods of
Plugin
interface becoming all default ones.
Development
- change visibility of
CartesianAxis
class, now it is public. - change visibility of
AbstractModel
class, now it is public. - add
checkAndGetValue
static method toIsColor
class. - add
@Override
annotation to all overriding methods. - 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
. - change the registering of tooltips positioner in order to apply to CHART.JS tooltips plugin.
- 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. - move
width
andheight
options toBaseBoxitem
class. - change all properties of
BaseBoxItem
,SizeItem
,LegendHitBoxItem
classes fromint
todouble
. - change
getLineWidths
andgetColumnWidths
methods ofLegendNode
class in order to return a list of doubles instead of a list of integers. - add
columnHeights
property toLegendNode
class. - improve the defaults management for scales.
- 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. - improve the code of
HtmlLegend
plugin in order to manage texts (for legend items and title) in the same way. - reduce visibility of property handler classes leveraging on the interface.
- 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. - implement
ImmutableDate
class to use to return the date value stored to chart configuration and to callbacks. - 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. - change
Travis
configuration in order to useJDK11
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
. - create
ItemSortCallback
interface in order to be extended by legend and tooltip callback interfaces. - 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
groups
method toRegExpResult
in order to get the object to refer to certain token by string that a regular expression matches. - add
cloneTo
method toNativeObject
in order to clone the object using theObject.assign
native method. - add
equals
andhashCode
methods to standard keys implementation inoptions
package. - add the following properties to
RegExp
class;-
lastIndex
(static) dotAll
global
ignoreCase
multiline
source
sticky
unicode
-
- 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.
- add
NativeConfiguration
native JSType class to get theconfig
from chart instance and used to update the configuration at runtime. - improve the management of properties used cross classes or packages.
- improve the tooltip callbacks management providing the right defaults.
- 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.
- 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. - use new location for legend, title and tooltips options, in
plugins
options node. - enable CI by GitHub Action, disabling Travis.
- fix font and color fallbacks to the defaults values.
License
Charba is available under the Apache 2.0 license.