- * Font family for the scale title, follows CSS font-family options. - *
- * - *- * Default {@code "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif"} - *
- */ public Font setFamily(final String family) { this.family = family; @@ -51,15 +42,6 @@ public Number getSize() return this.size; } - /** - *- * Font size for the scale title. - *
- * - *- * Default {@code 12} - *
- */ public Font setSize(final Number size) { this.size = size; @@ -71,15 +53,6 @@ public FontStyle getStyle() return this.style; } - /** - *- * Font style for the scale title, follows CSS font-style options (i.e. normal, italic, oblique, initial, inherit). - *
- * - *- * Default {@code "normal"} - *
- */ public Font setStyle(final FontStyle style) { this.style = style; @@ -97,17 +70,11 @@ public Font setWeight(final Number weight) return this; } - /** - * @see #setLineHeight(String) - */ public String getLineHeight() { return this.lineHeight; } - /** - * Height of an individual line of text - */ public void setLineHeight(final String lineHeight) { this.lineHeight = lineHeight; diff --git a/chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/Plugins.java b/chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/Plugins.java index 021421bc..5e34a20e 100644 --- a/chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/Plugins.java +++ b/chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/Plugins.java @@ -16,6 +16,7 @@ package software.xdev.chartjs.model.options; import software.xdev.chartjs.model.options.plugins.zoom.Zoom; +import software.xdev.chartjs.model.options.tooltip.TooltipOptions; public class Plugins @@ -23,7 +24,7 @@ public class Plugins protected Title title; protected Title subtitle; protected LegendOptions legend; - protected Tooltip tooltip; + protected TooltipOptions tooltip; protected Zoom zoom; /** @@ -81,9 +82,9 @@ public Plugins setLegend(final LegendOptions legend) } /** - * @see #setTooltip(Tooltip) + * @see #setTooltip(TooltipOptions) */ - public Tooltip getTooltip() + public TooltipOptions getTooltip() { return this.tooltip; } @@ -98,7 +99,7 @@ public Tooltip getTooltip() * functions must return either a string or an array of strings. Arrays of strings are treated as multiple lines of * text. */ - public Plugins setTooltip(final Tooltip tooltip) + public Plugins setTooltip(final TooltipOptions tooltip) { this.tooltip = tooltip; return this; diff --git a/chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/Tooltip.java b/chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/Tooltip.java deleted file mode 100644 index 53cc89d8..00000000 --- a/chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/Tooltip.java +++ /dev/null @@ -1,700 +0,0 @@ -/* - * Copyright © 2023 XDEV Software (https://xdev.software) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package software.xdev.chartjs.model.options; - -import software.xdev.chartjs.model.enums.FontStyle; -import software.xdev.chartjs.model.javascript.JavaScriptFunction; - - -public class Tooltip -{ - protected Boolean enabled; - protected JavaScriptFunction external; - protected String mode; - protected JavaScriptFunction itemSort; - protected Object backgroundColor; - protected String titleFontFamily; - protected Integer titleFontSize; - protected FontStyle titleFontStyle; - protected Object titleFontColor; - protected Integer titleSpacing; - protected Integer titleMarginBottom; - protected String bodyFontFamily; - protected Integer bodyFontSize; - protected FontStyle bodyFontStyle; - protected Object bodyFontColor; - protected Integer bodySpacing; - protected String footerFontFamily; - protected Integer footerFontSize; - protected FontStyle footerFontStyle; - protected Object footerFontColor; - protected Integer footerSpacing; - protected Integer footerMarginTop; - protected Integer xPadding; - protected Integer yPadding; - protected Integer caretSize; - protected Integer cornerRadius; - protected Object multiKeyBackground; - protected Callbacks callbacks; - - /** - * @see #setEnabled(Boolean) - */ - public Boolean getEnabled() - { - return this.enabled; - } - - /** - *- * Are tooltips enabled - *
- * - *- * Default {@code true} - *
- */ - public Tooltip setEnabled(final Boolean enabled) - { - this.enabled = enabled; - return this; - } - - /** - * @see #setExternal(JavaScriptFunction) - */ - public JavaScriptFunction getExternal() - { - return this.external; - } - - /** - *- * See section below - *
- * - *- * Default {@code null} - *
- */ - public Tooltip setExternal(final JavaScriptFunction external) - { - this.external = external; - return this; - } - - /** - * @see #setMode(String) - */ - public String getMode() - { - return this.mode; - } - - /** - *- * Sets which elements appear in the tooltip. Acceptable options are 'single', 'label' or 'x-axis'. single - * highlights the closest element. label highlights elements in all datasets at the same X value. 'x-axis' also - * highlights elements in all datasets at the same X value, but activates when hovering anywhere within the - * vertical - * slice of the x-axis representing that X value. - *
- * - *- * Default {@code 'single'} - *
- */ - public Tooltip setMode(final String mode) - { - this.mode = mode; - return this; - } - - /** - * @see #setItemSort(JavaScriptFunction) - */ - public JavaScriptFunction getItemSort() - { - return this.itemSort; - } - - /** - *- * Allows sorting of tooltip items. Must implement a function that can be passed to Array.prototype.sort - *
- * - *- * Default {@code undefined} - *
- */ - public Tooltip setItemSort(final JavaScriptFunction itemSort) - { - this.itemSort = itemSort; - return this; - } - - /** - * @see #setBackgroundColor(Object) - */ - public Object getBackgroundColor() - { - return this.backgroundColor; - } - - /** - *- * Background color of the tooltip - *
- * - *- * Default {@code 'rgba(0,0,0,0.8)'} - *
- */ - public Tooltip setBackgroundColor(final Object backgroundColor) - { - this.backgroundColor = backgroundColor; - return this; - } - - /** - * @see #setTitleFontFamily(String) - */ - public String getTitleFontFamily() - { - return this.titleFontFamily; - } - - /** - *- * Font family for tooltip title inherited from global font family - *
- * - *- * Default {@code "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif"} - *
- */ - public Tooltip setTitleFontFamily(final String titleFontFamily) - { - this.titleFontFamily = titleFontFamily; - return this; - } - - /** - * @see #setTitleFontSize(Integer) - */ - public Integer getTitleFontSize() - { - return this.titleFontSize; - } - - /** - *- * Font size for tooltip title inherited from global font size - *
- * - *- * Default {@code 12} - *
- */ - public Tooltip setTitleFontSize(final Integer titleFontSize) - { - this.titleFontSize = titleFontSize; - return this; - } - - /** - * @see #setTitleFontStyle(FontStyle) - */ - public FontStyle getTitleFontStyle() - { - return this.titleFontStyle; - } - - /** - *- * - *
- * - *- * Default {@code "bold"} - *
- */ - public Tooltip setTitleFontStyle(final FontStyle titleFontStyle) - { - this.titleFontStyle = titleFontStyle; - return this; - } - - /** - * @see #setTitleFontColor(Object) - */ - public Object getTitleFontColor() - { - return this.titleFontColor; - } - - /** - *- * Font color for tooltip title - *
- * - *- * Default {@code "#fff"} - *
- */ - public Tooltip setTitleFontColor(final Object titleFontColor) - { - this.titleFontColor = titleFontColor; - return this; - } - - /** - * @see #setTitleSpacing(Integer) - */ - public Integer getTitleSpacing() - { - return this.titleSpacing; - } - - /** - *- * Spacing to add to top and bottom of each title line. - *
- * - *- * Default {@code 2} - *
- */ - public Tooltip setTitleSpacing(final Integer titleSpacing) - { - this.titleSpacing = titleSpacing; - return this; - } - - /** - * @see #setTitleMarginBottom(Integer) - */ - public Integer getTitleMarginBottom() - { - return this.titleMarginBottom; - } - - /** - *- * Margin to add on bottom of title section - *
- * - *- * Default {@code 6} - *
- */ - public Tooltip setTitleMarginBottom(final Integer titleMarginBottom) - { - this.titleMarginBottom = titleMarginBottom; - return this; - } - - /** - * @see #setBodyFontFamily(String) - */ - public String getBodyFontFamily() - { - return this.bodyFontFamily; - } - - /** - *- * Font family for tooltip items inherited from global font family - *
- * - *- * Default {@code "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif"} - *
- */ - public Tooltip setBodyFontFamily(final String bodyFontFamily) - { - this.bodyFontFamily = bodyFontFamily; - return this; - } - - /** - * @see #setBodyFontSize(Integer) - */ - public Integer getBodyFontSize() - { - return this.bodyFontSize; - } - - /** - *- * Font size for tooltip items inherited from global font size - *
- * - *- * Default {@code 12} - *
- */ - public Tooltip setBodyFontSize(final Integer bodyFontSize) - { - this.bodyFontSize = bodyFontSize; - return this; - } - - /** - * @see #setBodyFontStyle(FontStyle) - */ - public FontStyle getBodyFontStyle() - { - return this.bodyFontStyle; - } - - /** - *- * - *
- * - *- * Default {@code "normal"} - *
- */ - public Tooltip setBodyFontStyle(final FontStyle bodyFontStyle) - { - this.bodyFontStyle = bodyFontStyle; - return this; - } - - /** - * @see #setBodyFontColor(Object) - */ - public Object getBodyFontColor() - { - return this.bodyFontColor; - } - - /** - *- * Font color for tooltip items. - *
- * - *- * Default {@code "#fff"} - *
- */ - public Tooltip setBodyFontColor(final Object bodyFontColor) - { - this.bodyFontColor = bodyFontColor; - return this; - } - - /** - * @see #setBodySpacing(Integer) - */ - public Integer getBodySpacing() - { - return this.bodySpacing; - } - - /** - *- * Spacing to add to top and bottom of each tooltip item - *
- * - *- * Default {@code 2} - *
- */ - public Tooltip setBodySpacing(final Integer bodySpacing) - { - this.bodySpacing = bodySpacing; - return this; - } - - /** - * @see #setFooterFontFamily(String) - */ - public String getFooterFontFamily() - { - return this.footerFontFamily; - } - - /** - *- * Font family for tooltip footer inherited from global font family. - *
- * - *- * Default {@code "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif"} - *
- */ - public Tooltip setFooterFontFamily(final String footerFontFamily) - { - this.footerFontFamily = footerFontFamily; - return this; - } - - /** - * @see #setFooterFontSize(Integer) - */ - public Integer getFooterFontSize() - { - return this.footerFontSize; - } - - /** - *- * Font size for tooltip footer inherited from global font size. - *
- * - *- * Default {@code 12} - *
- */ - public Tooltip setFooterFontSize(final Integer footerFontSize) - { - this.footerFontSize = footerFontSize; - return this; - } - - /** - * @see #setFooterFontStyle(FontStyle) - */ - public FontStyle getFooterFontStyle() - { - return this.footerFontStyle; - } - - /** - *- * Font style for tooltip footer. - *
- * - *- * Default {@code "bold"} - *
- */ - public Tooltip setFooterFontStyle(final FontStyle footerFontStyle) - { - this.footerFontStyle = footerFontStyle; - return this; - } - - /** - * @see #setFooterFontColor(Object) - */ - public Object getFooterFontColor() - { - return this.footerFontColor; - } - - /** - *- * Font color for tooltip footer. - *
- * - *- * Default {@code "#fff"} - *
- */ - public Tooltip setFooterFontColor(final Object footerFontColor) - { - this.footerFontColor = footerFontColor; - return this; - } - - /** - * @see #setFooterSpacing(Integer) - */ - public Integer getFooterSpacing() - { - return this.footerSpacing; - } - - /** - *- * Spacing to add to top and bottom of each footer line. - *
- * - *- * Default {@code 2} - *
- */ - public Tooltip setFooterSpacing(final Integer footerSpacing) - { - this.footerSpacing = footerSpacing; - return this; - } - - /** - * @see #setFooterMarginTop(Integer) - */ - public Integer getFooterMarginTop() - { - return this.footerMarginTop; - } - - /** - *- * Margin to add before drawing the footer - *
- * - *- * Default {@code 6} - *
- */ - public Tooltip setFooterMarginTop(final Integer footerMarginTop) - { - this.footerMarginTop = footerMarginTop; - return this; - } - - /** - * @see #setXPadding(Integer) - */ - public Integer getXPadding() - { - return this.xPadding; - } - - /** - *- * Padding to add on left and right of tooltip - *
- * - *- * Default {@code 6} - *
- */ - public Tooltip setXPadding(final Integer xPadding) - { - this.xPadding = xPadding; - return this; - } - - /** - * @see #setYPadding(Integer) - */ - public Integer getYPadding() - { - return this.yPadding; - } - - /** - *- * Padding to add on top and bottom of tooltip - *
- * - *- * Default {@code 6} - *
- */ - public Tooltip setYPadding(final Integer yPadding) - { - this.yPadding = yPadding; - return this; - } - - /** - * @see #setCaretSize(Integer) - */ - public Integer getCaretSize() - { - return this.caretSize; - } - - /** - *- * Size, in px, of the tooltip arrow - *
- * - *- * Default {@code 5} - *
- */ - public Tooltip setCaretSize(final Integer caretSize) - { - this.caretSize = caretSize; - return this; - } - - /** - * @see #setCornerRadius(Integer) - */ - public Integer getCornerRadius() - { - return this.cornerRadius; - } - - /** - *- * Radius of tooltip corner curves - *
- * - *- * Default {@code 6} - *
- */ - public Tooltip setCornerRadius(final Integer cornerRadius) - { - this.cornerRadius = cornerRadius; - return this; - } - - /** - * @see #setMultiKeyBackground(Object) - */ - public Object getMultiKeyBackground() - { - return this.multiKeyBackground; - } - - /** - *- * Color to draw behind the colored boxes when multiple items are in the tooltip - *
- * - *- * Default {@code "#fff"} - *
- */ - public Tooltip setMultiKeyBackground(final Object multiKeyBackground) - { - this.multiKeyBackground = multiKeyBackground; - return this; - } - - /** - * @see #setCallbacks(Callbacks) - */ - public Callbacks getCallbacks() - { - return this.callbacks; - } - - /** - *- * See the callbacks section below - *
- * - *- * Default {@code } - *
- */ - public Tooltip setCallbacks(final Callbacks callbacks) - { - this.callbacks = callbacks; - return this; - } -} diff --git a/chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/Callbacks.java b/chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/tooltip/TooltipCallbacks.java similarity index 51% rename from chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/Callbacks.java rename to chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/tooltip/TooltipCallbacks.java index 8f1dada8..177d770f 100644 --- a/chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/Callbacks.java +++ b/chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/tooltip/TooltipCallbacks.java @@ -13,12 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package software.xdev.chartjs.model.options; +package software.xdev.chartjs.model.options.tooltip; import software.xdev.chartjs.model.javascript.JavaScriptFunction; -public class Callbacks +/** + * @see ChartJS Source< + */ +public class TooltipCallbacks { protected JavaScriptFunction beforeTitle; protected JavaScriptFunction title; @@ -28,254 +31,162 @@ public class Callbacks protected JavaScriptFunction label; protected JavaScriptFunction labelColor; protected JavaScriptFunction labelTextColor; + protected JavaScriptFunction labelPointStyle; protected JavaScriptFunction afterLabel; protected JavaScriptFunction afterBody; protected JavaScriptFunction beforeFooter; protected JavaScriptFunction footer; protected JavaScriptFunction afterFooter; - /** - * @see #setBeforeTitle(JavaScriptFunction) - */ public JavaScriptFunction getBeforeTitle() { return this.beforeTitle; } - /** - *- * Returns the text to render before the title. - *
- */ - public Callbacks setBeforeTitle(final JavaScriptFunction beforeTitle) + public TooltipCallbacks setBeforeTitle(final JavaScriptFunction beforeTitle) { this.beforeTitle = beforeTitle; return this; } - /** - * @see #setTitle(JavaScriptFunction) - */ public JavaScriptFunction getTitle() { return this.title; } - /** - *- * Returns text to render as the title of the tooltip. - *
- */ - public Callbacks setTitle(final JavaScriptFunction title) + public TooltipCallbacks setTitle(final JavaScriptFunction title) { this.title = title; return this; } - /** - * @see #setAfterTitle(JavaScriptFunction) - */ public JavaScriptFunction getAfterTitle() { return this.afterTitle; } - /** - *- * Returns text to render after the title. - *
- */ - public Callbacks setAfterTitle(final JavaScriptFunction afterTitle) + public TooltipCallbacks setAfterTitle(final JavaScriptFunction afterTitle) { this.afterTitle = afterTitle; return this; } - /** - * @see #setBeforeBody(JavaScriptFunction) - */ public JavaScriptFunction getBeforeBody() { return this.beforeBody; } - /** - *- * Returns text to render before the body section. - *
- */ - public Callbacks setBeforeBody(final JavaScriptFunction beforeBody) + public TooltipCallbacks setBeforeBody(final JavaScriptFunction beforeBody) { this.beforeBody = beforeBody; return this; } - /** - * @see #setBeforeLabel(JavaScriptFunction) - */ public JavaScriptFunction getBeforeLabel() { return this.beforeLabel; } - /** - *- * Returns text to render before an individual label. This will be called for each item in the tooltip. - *
- */ - public Callbacks setBeforeLabel(final JavaScriptFunction beforeLabel) + public TooltipCallbacks setBeforeLabel(final JavaScriptFunction beforeLabel) { this.beforeLabel = beforeLabel; return this; } - /** - * @see #setLabel(JavaScriptFunction) - */ public JavaScriptFunction getLabel() { return this.label; } - /** - *- * Returns text to render for an individual item in the tooltip. - *
- */ - public Callbacks setLabel(final JavaScriptFunction label) + public TooltipCallbacks setLabel(final JavaScriptFunction label) { this.label = label; return this; } - /** - * @see #setLabelColor(JavaScriptFunction) - */ public JavaScriptFunction getLabelColor() { return this.labelColor; } - /** - *- * Returns the colors to render for the tooltip item. - *
- */ - public Callbacks setLabelColor(final JavaScriptFunction labelColor) + public TooltipCallbacks setLabelColor(final JavaScriptFunction labelColor) { this.labelColor = labelColor; return this; } - /** - * @see #setLabelTextColor(JavaScriptFunction) - */ public JavaScriptFunction getLabelTextColor() { return this.labelTextColor; } - /** - *- * Returns the colors for the text of the label for the tooltip item. - *
- */ - public Callbacks setLabelTextColor(final JavaScriptFunction labelTextColor) + public TooltipCallbacks setLabelTextColor(final JavaScriptFunction labelTextColor) { this.labelTextColor = labelTextColor; return this; } - /** - * @see #setAfterLabel(JavaScriptFunction) - */ + public JavaScriptFunction getLabelPointStyle() + { + return this.labelPointStyle; + } + + public TooltipCallbacks setLabelPointStyle(final JavaScriptFunction labelPointStyle) + { + this.labelPointStyle = labelPointStyle; + return this; + } + public JavaScriptFunction getAfterLabel() { return this.afterLabel; } - /** - *- * Returns text to render after an individual label. - *
- */ - public Callbacks setAfterLabel(final JavaScriptFunction afterLabel) + public TooltipCallbacks setAfterLabel(final JavaScriptFunction afterLabel) { this.afterLabel = afterLabel; return this; } - /** - * @see #setAfterBody(JavaScriptFunction) - */ public JavaScriptFunction getAfterBody() { return this.afterBody; } - /** - *- * Returns text to render after the body section. - *
- */ - public Callbacks setAfterBody(final JavaScriptFunction afterBody) + public TooltipCallbacks setAfterBody(final JavaScriptFunction afterBody) { this.afterBody = afterBody; return this; } - /** - * @see #setBeforeFooter(JavaScriptFunction) - */ public JavaScriptFunction getBeforeFooter() { return this.beforeFooter; } - /** - *- * Returns text to render before the footer section. - *
- */ - public Callbacks setBeforeFooter(final JavaScriptFunction beforeFooter) + public TooltipCallbacks setBeforeFooter(final JavaScriptFunction beforeFooter) { this.beforeFooter = beforeFooter; return this; } - /** - * @see #setFooter(JavaScriptFunction) - */ public JavaScriptFunction getFooter() { return this.footer; } - /** - *- * Returns text to render as the footer of the tooltip. - *
- */ - public Callbacks setFooter(final JavaScriptFunction footer) + public TooltipCallbacks setFooter(final JavaScriptFunction footer) { this.footer = footer; return this; } - /** - * @see #setAfterFooter(JavaScriptFunction) - */ public JavaScriptFunction getAfterFooter() { return this.afterFooter; } - /** - *- * Text to render after the footer section. - *
- */ - public Callbacks setAfterFooter(final JavaScriptFunction afterFooter) + public TooltipCallbacks setAfterFooter(final JavaScriptFunction afterFooter) { this.afterFooter = afterFooter; return this; diff --git a/chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/tooltip/TooltipOptions.java b/chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/tooltip/TooltipOptions.java new file mode 100644 index 00000000..b25f4e1f --- /dev/null +++ b/chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/tooltip/TooltipOptions.java @@ -0,0 +1,483 @@ +/* + * Copyright © 2023 XDEV Software (https://xdev.software) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package software.xdev.chartjs.model.options.tooltip; + +import software.xdev.chartjs.model.javascript.JavaScriptFunction; +import software.xdev.chartjs.model.options.Font; + + +/** + * @see ChartJS Source< + */ +public class TooltipOptions +{ + protected Boolean enabled; + protected JavaScriptFunction external; + protected String mode; + protected Boolean intersect; + protected String position; + protected TooltipCallbacks callbacks; + protected JavaScriptFunction itemSort; + protected JavaScriptFunction filter; + protected Object backgroundColor; + protected Object titleColor; + protected Font titleFont; + protected String titleAlign; + protected Number titleSpacing; + protected Number titleMarginBottom; + protected Object bodyColor; + protected Font bodyFont; + protected Number bodySpacing; + protected Object footerColor; + protected Font footerFont; + protected String footerAlign; + protected Number footerSpacing; + protected Number footerMarginTop; + protected Object padding; + protected Number caretPadding; + protected Number caretSize; + protected Number cornerRadius; + protected Object multiKeyBackground; + protected Boolean displayColors; + protected Number boxWidth; + protected Number boxHeight; + protected Number boxPadding; + protected Boolean usePointStyle; + protected Object borderColor; + protected Number borderWidth; + protected Boolean rtl; + protected String textDirection; + protected String xAlign; + protected String yAlign; + + public Boolean getEnabled() + { + return this.enabled; + } + + public TooltipOptions setEnabled(final Boolean enabled) + { + this.enabled = enabled; + return this; + } + + public JavaScriptFunction getExternal() + { + return this.external; + } + + public TooltipOptions setExternal(final JavaScriptFunction external) + { + this.external = external; + return this; + } + + public String getMode() + { + return this.mode; + } + + public TooltipOptions setMode(final String mode) + { + this.mode = mode; + return this; + } + + public Boolean getIntersect() + { + return this.intersect; + } + + public TooltipOptions setIntersect(final Boolean intersect) + { + this.intersect = intersect; + return this; + } + + public String getPosition() + { + return this.position; + } + + public TooltipOptions setPosition(final String position) + { + this.position = position; + return this; + } + + public TooltipCallbacks getCallbacks() + { + return this.callbacks; + } + + public TooltipOptions setCallbacks(final TooltipCallbacks callbacks) + { + this.callbacks = callbacks; + return this; + } + + public JavaScriptFunction getItemSort() + { + return this.itemSort; + } + + public TooltipOptions setItemSort(final JavaScriptFunction itemSort) + { + this.itemSort = itemSort; + return this; + } + + public JavaScriptFunction getFilter() + { + return this.filter; + } + + public TooltipOptions setFilter(final JavaScriptFunction filter) + { + this.filter = filter; + return this; + } + + public Object getBackgroundColor() + { + return this.backgroundColor; + } + + public TooltipOptions setBackgroundColor(final Object backgroundColor) + { + this.backgroundColor = backgroundColor; + return this; + } + + public Object getTitleColor() + { + return this.titleColor; + } + + public TooltipOptions setTitleColor(final Object titleColor) + { + this.titleColor = titleColor; + return this; + } + + public Font getTitleFont() + { + return this.titleFont; + } + + public TooltipOptions setTitleFont(final Font titleFont) + { + this.titleFont = titleFont; + return this; + } + + public String getTitleAlign() + { + return this.titleAlign; + } + + public TooltipOptions setTitleAlign(final String titleAlign) + { + this.titleAlign = titleAlign; + return this; + } + + public Number getTitleSpacing() + { + return this.titleSpacing; + } + + public TooltipOptions setTitleSpacing(final Number titleSpacing) + { + this.titleSpacing = titleSpacing; + return this; + } + + public Number getTitleMarginBottom() + { + return this.titleMarginBottom; + } + + public TooltipOptions setTitleMarginBottom(final Number titleMarginBottom) + { + this.titleMarginBottom = titleMarginBottom; + return this; + } + + public Object getBodyColor() + { + return this.bodyColor; + } + + public TooltipOptions setBodyColor(final Object bodyColor) + { + this.bodyColor = bodyColor; + return this; + } + + public Font getBodyFont() + { + return this.bodyFont; + } + + public TooltipOptions setBodyFont(final Font bodyFont) + { + this.bodyFont = bodyFont; + return this; + } + + public Number getBodySpacing() + { + return this.bodySpacing; + } + + public TooltipOptions setBodySpacing(final Number bodySpacing) + { + this.bodySpacing = bodySpacing; + return this; + } + + public Object getFooterColor() + { + return this.footerColor; + } + + public TooltipOptions setFooterColor(final Object footerColor) + { + this.footerColor = footerColor; + return this; + } + + public Font getFooterFont() + { + return this.footerFont; + } + + public TooltipOptions setFooterFont(final Font footerFont) + { + this.footerFont = footerFont; + return this; + } + + public String getFooterAlign() + { + return this.footerAlign; + } + + public TooltipOptions setFooterAlign(final String footerAlign) + { + this.footerAlign = footerAlign; + return this; + } + + public Number getFooterSpacing() + { + return this.footerSpacing; + } + + public TooltipOptions setFooterSpacing(final Number footerSpacing) + { + this.footerSpacing = footerSpacing; + return this; + } + + public Number getFooterMarginTop() + { + return this.footerMarginTop; + } + + public TooltipOptions setFooterMarginTop(final Number footerMarginTop) + { + this.footerMarginTop = footerMarginTop; + return this; + } + + public Object getPadding() + { + return this.padding; + } + + public TooltipOptions setPadding(final Object padding) + { + this.padding = padding; + return this; + } + + public Number getCaretPadding() + { + return this.caretPadding; + } + + public TooltipOptions setCaretPadding(final Number caretPadding) + { + this.caretPadding = caretPadding; + return this; + } + + public Number getCaretSize() + { + return this.caretSize; + } + + public TooltipOptions setCaretSize(final Number caretSize) + { + this.caretSize = caretSize; + return this; + } + + public Number getCornerRadius() + { + return this.cornerRadius; + } + + public TooltipOptions setCornerRadius(final Number cornerRadius) + { + this.cornerRadius = cornerRadius; + return this; + } + + public Object getMultiKeyBackground() + { + return this.multiKeyBackground; + } + + public TooltipOptions setMultiKeyBackground(final Object multiKeyBackground) + { + this.multiKeyBackground = multiKeyBackground; + return this; + } + + public Boolean getDisplayColors() + { + return this.displayColors; + } + + public TooltipOptions setDisplayColors(final Boolean displayColors) + { + this.displayColors = displayColors; + return this; + } + + public Number getBoxWidth() + { + return this.boxWidth; + } + + public TooltipOptions setBoxWidth(final Number boxWidth) + { + this.boxWidth = boxWidth; + return this; + } + + public Number getBoxHeight() + { + return this.boxHeight; + } + + public TooltipOptions setBoxHeight(final Number boxHeight) + { + this.boxHeight = boxHeight; + return this; + } + + public Number getBoxPadding() + { + return this.boxPadding; + } + + public TooltipOptions setBoxPadding(final Number boxPadding) + { + this.boxPadding = boxPadding; + return this; + } + + public Boolean getUsePointStyle() + { + return this.usePointStyle; + } + + public TooltipOptions setUsePointStyle(final Boolean usePointStyle) + { + this.usePointStyle = usePointStyle; + return this; + } + + public Object getBorderColor() + { + return this.borderColor; + } + + public TooltipOptions setBorderColor(final Object borderColor) + { + this.borderColor = borderColor; + return this; + } + + public Number getBorderWidth() + { + return this.borderWidth; + } + + public TooltipOptions setBorderWidth(final Number borderWidth) + { + this.borderWidth = borderWidth; + return this; + } + + public Boolean getRtl() + { + return this.rtl; + } + + public TooltipOptions setRtl(final Boolean rtl) + { + this.rtl = rtl; + return this; + } + + public String getTextDirection() + { + return this.textDirection; + } + + public TooltipOptions setTextDirection(final String textDirection) + { + this.textDirection = textDirection; + return this; + } + + public String getxAlign() + { + return this.xAlign; + } + + public TooltipOptions setxAlign(final String xAlign) + { + this.xAlign = xAlign; + return this; + } + + public String getyAlign() + { + return this.yAlign; + } + + public TooltipOptions setyAlign(final String yAlign) + { + this.yAlign = yAlign; + return this; + } +} diff --git a/chartjs-java-model/src/test/resources/screenshotReferences/BarChartScale.png b/chartjs-java-model/src/test/resources/screenshotReferences/BarChartScale.png index 595e543b..6dac2122 100644 Binary files a/chartjs-java-model/src/test/resources/screenshotReferences/BarChartScale.png and b/chartjs-java-model/src/test/resources/screenshotReferences/BarChartScale.png differ diff --git a/chartjs-java-model/src/test/resources/screenshotReferences/DoughnutChartBasic.png b/chartjs-java-model/src/test/resources/screenshotReferences/DoughnutChartBasic.png index 47bc7cae..484b4a6b 100644 Binary files a/chartjs-java-model/src/test/resources/screenshotReferences/DoughnutChartBasic.png and b/chartjs-java-model/src/test/resources/screenshotReferences/DoughnutChartBasic.png differ diff --git a/chartjs-java-model/src/test/resources/screenshotReferences/LineChartBasic.png b/chartjs-java-model/src/test/resources/screenshotReferences/LineChartBasic.png index 39d044d2..a44f0f7b 100644 Binary files a/chartjs-java-model/src/test/resources/screenshotReferences/LineChartBasic.png and b/chartjs-java-model/src/test/resources/screenshotReferences/LineChartBasic.png differ diff --git a/chartjs-java-model/src/test/resources/screenshotReferences/MixedChartBasic.png b/chartjs-java-model/src/test/resources/screenshotReferences/MixedChartBasic.png index 44c7e678..7a354d36 100644 Binary files a/chartjs-java-model/src/test/resources/screenshotReferences/MixedChartBasic.png and b/chartjs-java-model/src/test/resources/screenshotReferences/MixedChartBasic.png differ diff --git a/chartjs-java-model/src/test/resources/screenshotReferences/PieChartBasic.png b/chartjs-java-model/src/test/resources/screenshotReferences/PieChartBasic.png index b652b609..35ecad31 100644 Binary files a/chartjs-java-model/src/test/resources/screenshotReferences/PieChartBasic.png and b/chartjs-java-model/src/test/resources/screenshotReferences/PieChartBasic.png differ diff --git a/chartjs-java-model/src/test/resources/screenshotReferences/PolarChartBasic.png b/chartjs-java-model/src/test/resources/screenshotReferences/PolarChartBasic.png index 365317ad..4c396ac4 100644 Binary files a/chartjs-java-model/src/test/resources/screenshotReferences/PolarChartBasic.png and b/chartjs-java-model/src/test/resources/screenshotReferences/PolarChartBasic.png differ diff --git a/chartjs-java-model/src/test/resources/screenshotReferences/RadarChartBasic.png b/chartjs-java-model/src/test/resources/screenshotReferences/RadarChartBasic.png index 7be178dd..746dbff2 100644 Binary files a/chartjs-java-model/src/test/resources/screenshotReferences/RadarChartBasic.png and b/chartjs-java-model/src/test/resources/screenshotReferences/RadarChartBasic.png differ diff --git a/chartjs-java-model/src/test/resources/screenshotReferences/RadarChartBasicRadialScale.png b/chartjs-java-model/src/test/resources/screenshotReferences/RadarChartBasicRadialScale.png index b45aa91a..8f294348 100644 Binary files a/chartjs-java-model/src/test/resources/screenshotReferences/RadarChartBasicRadialScale.png and b/chartjs-java-model/src/test/resources/screenshotReferences/RadarChartBasicRadialScale.png differ diff --git a/pom.xml b/pom.xml index abf63cf2..98078356 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@