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

com.zavtech.morpheus.viz.google.GChartEngine Maven / Gradle / Ivy

There is a newer version: 0.9.21
Show newest version
/**
 * Copyright (C) 2014-2017 Xavier Witdouck
 *
 * 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 com.zavtech.morpheus.viz.google;

import com.zavtech.morpheus.viz.chart.Chart;
import com.zavtech.morpheus.viz.chart.ChartEngine;
import com.zavtech.morpheus.frame.DataFrame;

/**
 * A ChartEngine implementation used to create Google chart instances based on the Morpheus charting API.
 *
 * @link https://developers.google.com/chart/
 *
 * @author Xavier Witdouck
 *
 * 

This is open source software released under the Apache 2.0 License

*/ public class GChartEngine extends ChartEngine { @Override public Chart create(DataFrame frame) { if (frame == null) { throw new IllegalArgumentException("The DataFrame cannot be null"); } else { final GChart chart = new GChart<>(); chart.data().add(frame); return chart; } } @Override public Chart create(DataFrame frame, Class domainType, S domainKey) { if (frame == null) { throw new IllegalArgumentException("The DataFrame cannot be null"); } else { final GChart chart = new GChart<>(); chart.data().add(frame, domainKey); return chart; } } @Override public void show(int rows, int cols, Iterable charts) { } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy