All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.xdev.chartjs.model.charts.Chart Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
/*
 * 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.charts;

import com.fasterxml.jackson.annotation.JsonProperty;

import software.xdev.chartjs.model.data.AbstractData;
import software.xdev.chartjs.model.options.Options;


@SuppressWarnings("java:S119") // SELF means the Chart itself... Not a problem
public interface Chart, D extends AbstractData>
{
	/**
	 * @return type of this {@link Chart} implementation for proper drawing in JavaScript.
	 */
	@JsonProperty("type")
	String getType();
	
	/**
	 * @deprecated As of 2.1.0 {@link #toJson()} has the same functionality and should be used instead
	 */
	@Deprecated(since = "2.1.0", forRemoval = true)
	default String toJsonNative()
	{
		return this.toJson();
	}
	
	/**
	 * 

* Convert {@code this} instance to Json for use with Chart.js library. *

* * @return json representation of {@code this} {@link Chart} */ String toJson(); /** * @deprecated No functionality implemented as of 2.1.0 */ @Deprecated(since = "2.1.0", forRemoval = true) default boolean isDrawable() { return true; } SELF setOptions(final O options); SELF setData(final D data); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy