Skip to content

Commit 79cc1e7

Browse files
authored
Merge pull request #333 from xdev-software/sync-tooltip
Synced tooltip with ChartJS source/docs
2 parents bf78d62 + 50ce86d commit 79cc1e7

File tree

9 files changed

+525
-860
lines changed

9 files changed

+525
-860
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 2.8.0
2+
* Synced ``TooltipOptions`` from ChartJS source code #330
3+
14
## 2.7.0
25
* ``Title``: Make it possible to set custom padding and multi-line text #316
36

chartjs-java-model-demo/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
<parent>
88
<groupId>software.xdev</groupId>
99
<artifactId>chartjs-java-model-root</artifactId>
10-
<version>2.7.1-SNAPSHOT</version>
10+
<version>2.8.0-SNAPSHOT</version>
1111
</parent>
1212

1313
<artifactId>chartjs-java-model-demo</artifactId>
14-
<version>2.7.1-SNAPSHOT</version>
14+
<version>2.8.0-SNAPSHOT</version>
1515
<packaging>jar</packaging>
1616

1717
<organization>

chartjs-java-model/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>software.xdev</groupId>
88
<artifactId>chartjs-java-model</artifactId>
9-
<version>2.7.1-SNAPSHOT</version>
9+
<version>2.8.0-SNAPSHOT</version>
1010
<packaging>jar</packaging>
1111

1212
<name>chartjs-java-model</name>

chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/Font.java

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,6 @@ public String getFamily()
3131
return this.family;
3232
}
3333

34-
/**
35-
* <p>
36-
* Font family for the scale title, follows CSS font-family options.
37-
* </p>
38-
*
39-
* <p>
40-
* Default {@code "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif"}
41-
* </p>
42-
*/
4334
public Font setFamily(final String family)
4435
{
4536
this.family = family;
@@ -51,15 +42,6 @@ public Number getSize()
5142
return this.size;
5243
}
5344

54-
/**
55-
* <p>
56-
* Font size for the scale title.
57-
* </p>
58-
*
59-
* <p>
60-
* Default {@code 12}
61-
* </p>
62-
*/
6345
public Font setSize(final Number size)
6446
{
6547
this.size = size;
@@ -71,15 +53,6 @@ public FontStyle getStyle()
7153
return this.style;
7254
}
7355

74-
/**
75-
* <p>
76-
* Font style for the scale title, follows CSS font-style options (i.e. normal, italic, oblique, initial, inherit).
77-
* </p>
78-
*
79-
* <p>
80-
* Default {@code "normal"}
81-
* </p>
82-
*/
8356
public Font setStyle(final FontStyle style)
8457
{
8558
this.style = style;
@@ -97,17 +70,11 @@ public Font setWeight(final Number weight)
9770
return this;
9871
}
9972

100-
/**
101-
* @see #setLineHeight(String)
102-
*/
10373
public String getLineHeight()
10474
{
10575
return this.lineHeight;
10676
}
10777

108-
/**
109-
* Height of an individual line of text
110-
*/
11178
public void setLineHeight(final String lineHeight)
11279
{
11380
this.lineHeight = lineHeight;

chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/Plugins.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@
1616
package software.xdev.chartjs.model.options;
1717

1818
import software.xdev.chartjs.model.options.plugins.zoom.Zoom;
19+
import software.xdev.chartjs.model.options.tooltip.TooltipOptions;
1920

2021

2122
public class Plugins
2223
{
2324
protected Title title;
2425
protected Title subtitle;
2526
protected LegendOptions legend;
26-
protected Tooltip tooltip;
27+
protected TooltipOptions tooltip;
2728
protected Zoom zoom;
2829

2930
/**
@@ -81,9 +82,9 @@ public Plugins setLegend(final LegendOptions legend)
8182
}
8283

8384
/**
84-
* @see #setTooltip(Tooltip)
85+
* @see #setTooltip(TooltipOptions)
8586
*/
86-
public Tooltip getTooltip()
87+
public TooltipOptions getTooltip()
8788
{
8889
return this.tooltip;
8990
}
@@ -98,7 +99,7 @@ public Tooltip getTooltip()
9899
* functions must return either a string or an array of strings. Arrays of strings are treated as multiple lines of
99100
* text.
100101
*/
101-
public Plugins setTooltip(final Tooltip tooltip)
102+
public Plugins setTooltip(final TooltipOptions tooltip)
102103
{
103104
this.tooltip = tooltip;
104105
return this;

0 commit comments

Comments
 (0)