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

software.xdev.chartjs.model.dataset.BubbleDataset Maven / Gradle / Ivy

There is a newer version: 2.5.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.dataset;

import java.util.List;

import software.xdev.chartjs.model.datapoint.BubbleDataPoint;
import software.xdev.chartjs.model.objects.OptionalArray;


/**
 * @see ChartJS Source
 */
public class BubbleDataset extends BackgroundBorderHoverDataset
{
	protected String xAxisID;
	protected String yAxisID;
	
	protected final List hoverRadius = new OptionalArray<>();
	
	protected Object pointStyle;
	
	@Override
	protected String defaultType()
	{
		return "bubble";
	}
	
	public String getXAxisID()
	{
		return this.xAxisID;
	}
	
	public BubbleDataset setXAxisID(final String xAxisID)
	{
		this.xAxisID = xAxisID;
		return this;
	}
	
	public String getYAxisID()
	{
		return this.yAxisID;
	}
	
	public BubbleDataset setYAxisID(final String yAxisID)
	{
		this.yAxisID = yAxisID;
		return this;
	}
	
	/**
	 * 

* Additional radius to add to data radius on hover. *

* *

* Each BubbleDataPoint in this BubbleDataset uses the hoverRadius at its corresponding index. *

*/ public BubbleDataset setHoverRadius(final List hoverRadius) { this.hoverRadius.clear(); if(hoverRadius != null) { this.hoverRadius.addAll(hoverRadius); } return this; } /** * @see BubbleDataset#setHoverRadius(List) */ public BubbleDataset addHoverRadius(final Integer hoverRadius) { this.hoverRadius.add(hoverRadius); return this; } public List getHoverRadius() { return this.hoverRadius; } public Object getPointStyle() { return this.pointStyle; } public BubbleDataset setPointStyle(final Object pointStyle) { this.pointStyle = pointStyle; return this; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy