本文整理汇总了Java中com.googlecode.wickedcharts.highcharts.options.Title类的典型用法代码示例。如果您正苦于以下问题:Java Title类的具体用法?Java Title怎么用?Java Title使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Title类属于com.googlecode.wickedcharts.highcharts.options包,在下文中一共展示了Title类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SplatterChartOptions
import com.googlecode.wickedcharts.highcharts.options.Title; //导入依赖的package包/类
public SplatterChartOptions(final ChartConfiguration configuration) throws Exception {
this.eventType = configuration.getEventType();
this.attributeName = configuration.getAttributeName();
this.title = configuration.getTitle();
final ChartOptions chartOptions = new ChartOptions();
chartOptions.setType(SeriesType.SCATTER);
this.setChartOptions(chartOptions);
this.setTitle(new Title(this.title));
// X-Achse
final Axis xAxis = new Axis();
xAxis.setType(AxisType.DATETIME);
final DateTimeLabelFormat dateTimeLabelFormat = new DateTimeLabelFormat().setProperty(DateTimeProperties.DAY, "%e.%m.%Y").setProperty(DateTimeProperties.MONTH, "%m/%Y").setProperty(DateTimeProperties.YEAR, "%Y");
xAxis.setDateTimeLabelFormats(dateTimeLabelFormat);
this.setxAxis(xAxis);
// Y-Achse
final Axis yAxis = new Axis();
yAxis.setTitle(new Title(this.attributeName));
yAxis.setType(AxisType.LINEAR);
this.setyAxis(yAxis);
// Tooltip
final Tooltip tooltip = new Tooltip();
tooltip.setFormatter(new Function("return '<b>'+ this.series.name +'</b><br/>'+Highcharts.dateFormat('%e.%m.%Y', this.x) +': '+ this.y ;"));
this.setTooltip(tooltip);
final CustomCoordinatesSeries<String, Number> series = new CustomCoordinatesSeries<String, Number>();
series.setColor(new RgbaColor(119, 152, 191, 0.5f));
series.setName(this.eventType.getTypeName());
series.setData(this.getSeriesData());
this.addSeries(series);
}
示例2: getTrafficLightOptions
import com.googlecode.wickedcharts.highcharts.options.Title; //导入依赖的package包/类
private Options getTrafficLightOptions(){
Options options = new Options();
if(lastBuildSuccess != null){
HexColor color = getTrafficLightColor(lastBuildSuccess.getValue());
options.setChartOptions(new ChartOptions()
.setPlotBackgroundColor(new NullColor())
.setPlotBorderWidth(null)
.setHeight(250)
.setPlotShadow(Boolean.FALSE));
options.setTitle(new Title("Latest Build Status"));
options.setSubtitle(new Title(projectName));
options.setPlotOptions(new PlotOptionsChoice()
.setPie(new PlotOptions()
.setAllowPointSelect(Boolean.FALSE)
.setBorderWidth(0) // to make it look like a "traffic light"
.setCursor(Cursor.POINTER)));
options.addSeries(new PointSeries()
.setType(SeriesType.PIE)
.addPoint(new Point(lastBuildSuccess.getValue(), 100).setColor(color)));
}
return options;
}
示例3: getChartOptions
import com.googlecode.wickedcharts.highcharts.options.Title; //导入依赖的package包/类
/**
*
* @param
* @return
*/
public Options getChartOptions(List<SonarMetricMeasurement> metrics ){
String group;
if (settings.get("metric") == null) {
group = "Code Lines related";
} else {
group = settings.get("metric");
}
// get latest
List<SonarMetricMeasurement> latestMetrics = getLatestMetricDataSet(metrics);
List<SonarMetricMeasurement> metricGroup = getMetricsForGroup(group, latestMetrics);
Options options = new Options();
ChartOptions chartOptions = new ChartOptions();
SeriesType seriesType = SeriesType.COLUMN;
chartOptions.setType(seriesType);
Title chartTitle = new Title(title + " of " + group + " Metrics");
options.setTitle(chartTitle);
for(SonarMetricMeasurement metric: metricGroup){
PointSeries series = new PointSeries();
series.setType(seriesType);
series.addPoint(new Point(metric.getSonarMetric(), new Double(metric.getValue())));
series.setName(metric.getSonarMetric());
options.addSeries(series);
}
options.setChartOptions(chartOptions);
return options;
}
示例4: getChartOptionsDifferently
import com.googlecode.wickedcharts.highcharts.options.Title; //导入依赖的package包/类
public Options getChartOptionsDifferently(List<SonarMetricMeasurement> metrics,String individualMetric) {
String group;
if (settings.get("metric") == null) {
group = "Code Lines related";
} else {
group = settings.get("metric");
}
// get latest
//List<SonarMetricMeasurement> latestMetrics = getLatestMetricDataSet(metrics);
// List<SonarMetricMeasurement> metricGroup = getMetricsForGroup(group, latestMetrics);
Options options = new Options();
ChartOptions chartOptions = new ChartOptions();
SeriesType seriesType = SeriesType.COLUMN;
chartOptions.setType(seriesType);
Title chartTitle = new Title(title + " of " + group + " Metrics");
options.setTitle(chartTitle);
for (SonarMetricMeasurement metric : metrics) {
if(metric.getSonarMetric().compareToIgnoreCase(individualMetric) == 0){
PointSeries series = new PointSeries();
series.setType(seriesType);
series.addPoint(new Point(metric.getSonarMetric(), new Double(metric.getValue())));
series.setName(metric.getSonarMetric());
options.addSeries(series);
}
}
options.setChartOptions(chartOptions);
return options;
}
示例5: getChartOptions
import com.googlecode.wickedcharts.highcharts.options.Title; //导入依赖的package包/类
/**
*
* @param
* @return
*/
private Options getChartOptions() {
Options options = new Options();
options.setChartOptions(new ChartOptions().setType(SeriesType.valueOf(chartType)));
options.setTitle(new Title("Jira Metrics (" + timeInterval + ")"));
options.setxAxis(new Axis().setCategories(UQasarUtil.getJiraMetricNamesAbbreviated()));
options.setyAxis(new Axis().setTitle(new Title("Number of issues")));
List<Number> resItems = new ArrayList<>();
for (JiraMetricMeasurement jiraMeasurement : measurements) {
int count;
try {
if (timeInterval.compareToIgnoreCase("Latest") == 0) {
count = getDataService().countMeasurementsPerProjectByMetricWithLatestDate(project,
jiraMeasurement.getJiraMetric());
}
count = getDataService().countMeasurementsPerProjectByMetricWithinPeriod(project,
jiraMeasurement.getJiraMetric(), timeInterval);
resItems.add(count);
} catch (uQasarException e1) {
e1.printStackTrace();
}
}
options.addSeries(new SimpleSeries().setName("Jira Data").setData(resItems));
return options;
}
示例6: getChartOptionsDifferently
import com.googlecode.wickedcharts.highcharts.options.Title; //导入依赖的package包/类
/**
*
* @param
* @return
*/
private Options getChartOptionsDifferently() {
Options options = new Options();
options.setChartOptions(new ChartOptions().setType(SeriesType.valueOf(chartType)));
options.setTitle(new Title("Jira Metrics (" + timeInterval + ")"));
options.setxAxis(new Axis().setCategories(UQasarUtil.getJiraMetricNamesAbbreviated()));
options.setyAxis(new Axis().setTitle(new Title("Number of issues")));
List<Number> resItems = new ArrayList<>();
for (JiraMetricMeasurement jiraMeasurement : measurements) {
if (jiraMeasurement.getJiraMetric().equals(individualMetric)) {
int count;
try {
if (timeInterval.compareToIgnoreCase("Latest") == 0) {
count = getDataService().countMeasurementsPerProjectByMetricWithLatestDate(project,
jiraMeasurement.getJiraMetric());
}
count = getDataService().countMeasurementsPerProjectByMetricWithinPeriod(project,
jiraMeasurement.getJiraMetric(), timeInterval);
resItems.add(count);
} catch (uQasarException e1) {
e1.printStackTrace();
}
}
}
options.addSeries(new SimpleSeries().setName("Jira Data").setData(resItems));
return options;
}
示例7: historicChart
import com.googlecode.wickedcharts.highcharts.options.Title; //导入依赖的package包/类
/**
* @return Returns a graphical representation of all the values,
* thresholds and target value by date
*/
private Chart historicChart(){
Options options = new Options();
options.setTitle(new Title(project.getName()));
List<Number> values = new ArrayList<>();
List<Number> upLimit = new ArrayList<>();
List<Number> lowLimit = new ArrayList<>();
List<String> dates = new ArrayList<>();
// Prepare information to be show in the graphic
for (AbstractHistoricValues h : historicalService.getAllHistValuesForProjectAsc(projectId)) {
values.add(h.getValue());
upLimit.add(h.getUpperAcceptanceLimit());
lowLimit.add(h.getLowerAcceptanceLimit());
dates.add(new SimpleDateFormat("dd.MM.yyyy").format(h.getDate()));
}
// X Axis
Axis xAxis = new Axis();
xAxis.setCategories(dates);
options.setxAxis(xAxis);
// Y Axis
Axis yAxis = new Axis();
options.setyAxis(yAxis);
// Adding series to the graphic
options.addSeries(new SimpleSeries().setName("Value").setData(values));
options.addSeries(new SimpleSeries().setName("UpLimit").setData(upLimit));
options.addSeries(new SimpleSeries().setName("LowLimit").setData(lowLimit));
// Legend
Legend legend = new Legend();
legend.setBorderWidth(0);
options.setLegend(legend);
return new Chart("chart",options);
}
示例8: SkiesTheme
import com.googlecode.wickedcharts.highcharts.options.Title; //导入依赖的package包/类
public SkiesTheme() {
this.addColor(new HexColor("#514F78"));
this.addColor(new HexColor("#42A07B"));
this.addColor(new HexColor("#9B5E4A"));
this.addColor(new HexColor("#72727F"));
this.addColor(new HexColor("#1F949A"));
this.addColor(new HexColor("#82914E"));
this.addColor(new HexColor("#86777F"));
this.addColor(new HexColor("#42A07B"));
ChartOptions chartOptions = new ChartOptions()
.setClassName("skies")
.setBorderWidth(0)
.setPlotShadow(Boolean.TRUE)
.setPlotBackgroundImage("/img/skies.jpg")
.setPlotBackgroundColor(
new LinearGradient(0, 0, 250, 500).addStop(0, new RgbaColor(255, 255, 255, 1f)).addStop(1,
new RgbaColor(255, 255, 255, 0f))).setPlotBorderWidth(1);
this.setChartOptions(chartOptions);
this.setTitle(new Title().setStyle(new CssStyle()));
this.setSubtitle(new Title().setStyle(new CssStyle()));
Axis xAxis = new Axis().setGridLineWidth(0).setLineColor(new HexColor("#C0D0E0"))
.setTickColor(new HexColor("#C0D0E0")).setLabels(new Labels().setStyle(new CssStyle()))
.setTitle(new Title().setStyle(new CssStyle()));
this.setxAxis(xAxis);
Axis yAxis = new Axis().setAlternateGridColor(new RgbaColor(255, 255, 255, .5f))
.setLineColor(new HexColor("#C0D0E0")).setTickColor(new HexColor("#C0D0E0")).setTickWidth(1)
.setLabels(new Labels().setStyle(new CssStyle())).setTitle(new Title().setStyle(new CssStyle()));
this.setyAxis(yAxis);
Legend legend = new Legend().setItemStyle(new CssStyle()).setItemHoverStyle(new CssStyle())
.setItemHiddenStyle(new CssStyle());
this.setLegend(legend);
this.setLabels(new Labels().setStyle(new CssStyle()));
}
示例9: createChartValue
import com.googlecode.wickedcharts.highcharts.options.Title; //导入依赖的package包/类
private WickedChart createChartValue(String title, List<String> titles, List<Number> values, Number min, Number max) {
Options options = new Options();
options.setChartOptions(new ChartOptions().setType(SeriesType.COLUMN));
options.setTitle(new Title(title));
options.setxAxis(new Axis().setCategories(titles));
options.setyAxis(new Axis().setMin(min).setMax(max));
options.setLegend(
new Legend()
.setLayout(LegendLayout.VERTICAL)
.setBackgroundColor(new HexColor("#FFFFFF"))
.setAlign(HorizontalAlignment.LEFT)
.setVerticalAlign(VerticalAlignment.TOP).setX(100).setY(70).setFloating(Boolean.TRUE).setShadow(Boolean.TRUE));
options.setTooltip(
new Tooltip().setFormatter(new Function().setFunction(" return ''+ this.x +': '+ this.y;")));
options.setPlotOptions(
new PlotOptionsChoice()
.setColumn(new PlotOptions().setPointPadding(0.2f).setBorderWidth(0)));
Series<Number> setData = new SimpleSeries().setName("Value").setData(values);
options.addSeries(setData);
return new WickedChart(options);
}
开发者ID:isisaddons-legacy,项目名称:isis-wicket-wickedcharts,代码行数:29,代码来源:CollectionContentsAsSummaryCharts.java
示例10: getChartOptions
import com.googlecode.wickedcharts.highcharts.options.Title; //导入依赖的package包/类
protected static final Options getChartOptions(final PersonProvider provider) {
Options opts = new Options();
opts.setTitle(new Title("Account data"));
opts.setSubtitle(new Title("Amounts at given dates"));
opts.setChartOptions(new ChartOptions()
.setType(SeriesType.SPLINE));
Axis xAxis = new Axis();
xAxis.setType(AxisType.DATETIME);
DateTimeLabelFormat dateTimeLabelFormat = new DateTimeLabelFormat()
.setProperty(DateTimeLabelFormat.DateTimeProperties.MONTH, "%e. %b")
.setProperty(DateTimeLabelFormat.DateTimeProperties.YEAR, "%b");
xAxis.setDateTimeLabelFormats(dateTimeLabelFormat);
opts.setxAxis(xAxis);
Iterator<? extends Person> personIterator = provider.iterator(0, 0);
while (personIterator.hasNext()) {
Person person = personIterator.next();
List<Statement> statements = person.getStatements();
List<Coordinate<String, Double>> values = new ArrayList(statements.size());
for (Statement stat: statements) {
SimpleDateFormat sdf = new SimpleDateFormat("'Date.UTC(1970, 'MM', 'DD')'");
String datestring = sdf.format(stat.getDate());
values.add(new Coordinate<String, Double>(datestring, stat.getAmount()));
}
Collections.sort(values, COORD_COMPARE);
Series series = new Series<Double>() { };
series.setData(values);
series.setName(person.getName());
opts.addSeries(series);
}
return opts;
}
示例11: GraficoTortaClientes
import com.googlecode.wickedcharts.highcharts.options.Title; //导入依赖的package包/类
public GraficoTortaClientes(Map<Cliente, AtomicInteger> a){
setChartOptions(new ChartOptions()
.setPlotBackgroundColor(new NullColor())
.setPlotBorderWidth(null)
.setPlotShadow(Boolean.FALSE));
setTitle(new Title("Grafico Tarjetas por Cliente"));
//*********************************************************************************
PercentageFormatter formatter = new PercentageFormatter();
setTooltip(
new Tooltip()
.setFormatter(
formatter)
. setPercentageDecimals(1));
//*********************************************************************************
setPlotOptions(new PlotOptionsChoice()
.setPie(new PlotOptions()
.setAllowPointSelect(Boolean.TRUE)
.setCursor(Cursor.POINTER)
.setDataLabels(new DataLabels()
.setEnabled(Boolean.TRUE)
.setColor(new HexColor("#000000"))
.setConnectorColor(new HexColor("#000000"))
.setFormatter(formatter))));
//*********************************************************************************
Series<Point> series = new PointSeries()
.setType(SeriesType.PIE);
series.setTooltip(
new Tooltip().setFormatter(new Function().setFunction(" return ''+ Pepe +': '+ Juan;")));
//*********************************************************************************
int i=0;
for (Map.Entry<Cliente, AtomicInteger> entry : a.entrySet()) {
series
.addPoint(
//*********************************************************************************
new Point(entry.getKey().getNombre(), entry.getValue().get()).setColor(
new RadialGradient()
.setCx(0.5)
.setCy(0.3)
.setR(0.7)
.addStop(0, new HighchartsColor(i))
.addStop(1, new HighchartsColor(i).brighten(-0.3f))));
//*********************************************************************************
i++;
}
addSeries(series);
}
示例12: GraficoTortaReportadas
import com.googlecode.wickedcharts.highcharts.options.Title; //导入依赖的package包/类
public GraficoTortaReportadas(Map<Boolean, AtomicInteger> a){
setChartOptions(new ChartOptions()
.setPlotBackgroundColor(new NullColor())
.setPlotBorderWidth(null)
.setPlotShadow(Boolean.FALSE));
setTitle(new Title("Grafico Tarjetas Reportadas"));
PercentageFormatter formatter = new PercentageFormatter();
setTooltip(
new Tooltip()
.setFormatter(
formatter)
. setPercentageDecimals(1));
setPlotOptions(new PlotOptionsChoice()
.setPie(new PlotOptions()
.setAllowPointSelect(Boolean.TRUE)
.setCursor(Cursor.POINTER)
.setDataLabels(new DataLabels()
.setEnabled(Boolean.TRUE)
.setColor(new HexColor("#000000"))
.setConnectorColor(new HexColor("#000000"))
.setFormatter(formatter))));
Series<Point> series = new PointSeries()
.setType(SeriesType.PIE);
int i=0;
for (Map.Entry<Boolean, AtomicInteger> entry : a.entrySet()) {
series
.addPoint(
new Point(nombre(entry.getKey()), entry.getValue().get()).setColor(
new RadialGradient()
.setCx(0.5)
.setCy(0.3)
.setR(0.7)
.addStop(0, new HighchartsColor(i))
.addStop(1, new HighchartsColor(i).brighten(-0.3f))));
i++;
}
addSeries(series);
}
示例13: GraficoTortaEventos
import com.googlecode.wickedcharts.highcharts.options.Title; //导入依赖的package包/类
public GraficoTortaEventos(Map<Evento, AtomicInteger> a){
setChartOptions(new ChartOptions()
.setPlotBackgroundColor(new NullColor())
.setPlotBorderWidth(null)
.setPlotShadow(Boolean.FALSE));
setTitle(new Title("Grafico Tarjetas por Eventos"));
PercentageFormatter formatter = new PercentageFormatter();
setTooltip(
new Tooltip()
.setFormatter(
formatter)
. setPercentageDecimals(1));
setPlotOptions(new PlotOptionsChoice()
.setPie(new PlotOptions()
.setAllowPointSelect(Boolean.TRUE)
.setCursor(Cursor.POINTER)
.setDataLabels(new DataLabels()
.setEnabled(Boolean.TRUE)
.setColor(new HexColor("#000000"))
.setConnectorColor(new HexColor("#000000"))
.setFormatter(formatter))));
Series<Point> series = new PointSeries()
.setType(SeriesType.PIE);
int i=0;
for (Map.Entry<Evento, AtomicInteger> entry : a.entrySet()) {
series
.addPoint(
new Point(entry.getKey().getNombre(), entry.getValue().get()).setColor(
new RadialGradient()
.setCx(0.5)
.setCy(0.3)
.setR(0.7)
.addStop(0, new HighchartsColor(i))
.addStop(1, new HighchartsColor(i).brighten(-0.3f))));
i++;
}
addSeries(series);
}
示例14: GraficoTortaBarras
import com.googlecode.wickedcharts.highcharts.options.Title; //导入依赖的package包/类
public GraficoTortaBarras(Map<String, AtomicInteger> a){
setChartOptions(new ChartOptions()
.setPlotBackgroundColor(new NullColor())
.setPlotBorderWidth(null)
.setPlotShadow(Boolean.FALSE));
setTitle(new Title("Grafico Tarjetas por Cliente"));
setSubtitle(new Title("Los meses que no aparecen, es por que no se registran cargas de tarjetas"));
PercentageFormatter formatter = new PercentageFormatter();
setTooltip(
new Tooltip()
.setFormatter(
formatter)
. setPercentageDecimals(1));
setPlotOptions(new PlotOptionsChoice()
.setPie(new PlotOptions()
.setAllowPointSelect(Boolean.TRUE)
.setCursor(Cursor.POINTER)
.setDataLabels(new DataLabels()
.setEnabled(Boolean.TRUE)
.setColor(new HexColor("#000000"))
.setConnectorColor(new HexColor("#000000"))
.setFormatter(formatter))));
//*********************************************************************************
Series<Point> series = new PointSeries()
.setType(SeriesType.COLUMN);
List<String> titles = new ArrayList<String>();
//*********************************************************************************
int i=0;
for (Map.Entry<String, AtomicInteger> entry : a.entrySet()) {
series
.addPoint(
new Point(entry.getKey(), entry.getValue().get()).setColor(
new RadialGradient()
.setCx(0.5)
.setCy(0.3)
.setR(0.7)
.addStop(0, new HighchartsColor(i))
.addStop(1, new HighchartsColor(i).brighten(-0.3f))));
titles.add(""+entry.getKey());
i++;
}
this.setxAxis(new Axis().setCategories(titles));
//*********************************************************************************
addSeries(series);
}
示例15: GraficoTortaResueltos
import com.googlecode.wickedcharts.highcharts.options.Title; //导入依赖的package包/类
public GraficoTortaResueltos(Map<Boolean, AtomicInteger> a){
setChartOptions(new ChartOptions()
.setPlotBackgroundColor(new NullColor())
.setPlotBorderWidth(null)
.setPlotShadow(Boolean.FALSE));
setTitle(new Title("Grafico Tarjetas Resueltas"));
PercentageFormatter formatter = new PercentageFormatter();
setTooltip(
new Tooltip()
.setFormatter(
formatter)
. setPercentageDecimals(1));
setPlotOptions(new PlotOptionsChoice()
.setPie(new PlotOptions()
.setAllowPointSelect(Boolean.TRUE)
.setCursor(Cursor.POINTER)
.setDataLabels(new DataLabels()
.setEnabled(Boolean.TRUE)
.setColor(new HexColor("#000000"))
.setConnectorColor(new HexColor("#000000"))
.setFormatter(formatter))));
Series<Point> series = new PointSeries()
.setType(SeriesType.PIE);
int i=0;
for (Map.Entry<Boolean, AtomicInteger> entry : a.entrySet()) {
series
.addPoint(
new Point(nombre(entry.getKey()), entry.getValue().get()).setColor(
new RadialGradient()
.setCx(0.5)
.setCy(0.3)
.setR(0.7)
.addStop(0, new HighchartsColor(i))
.addStop(1, new HighchartsColor(i).brighten(-0.3f))));
i++;
}
addSeries(series);
}