Examples of CategoryAxis


Examples of com.invient.vaadin.charts.InvientChartsConfig.CategoryAxis

    chartConfig.getTitle().setX(-20);
    chartConfig.getTitle().setText("Wartość U w podziale na lata");
    // chartConfig.getSubtitle().setText("Source: WorldClimate.com");

    CategoryAxis categoryAxis = new CategoryAxis();
    categoryAxis.setCategories(Arrays
        .asList("Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec",
            "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"));
    LinkedHashSet<XAxis> xAxesSet = new LinkedHashSet<InvientChartsConfig.XAxis>();
    xAxesSet.add(categoryAxis);
    chartConfig.setXAxes(xAxesSet);
View Full Code Here

Examples of com.positive.charts.axis.CategoryAxis

      final boolean legend, final boolean tooltips) {

    if (orientation == null) {
      throw new IllegalArgumentException("Null 'orientation' argument.");
    }
    final CategoryAxis categoryAxis = new CategoryAxis(categoryAxisLabel);
    final ValueAxis valueAxis = new NumberAxis(valueAxisLabel);

    final BarRenderer renderer = new BarRenderer();
    if (orientation == PlotOrientation.HORIZONTAL) {
      final ItemLabelPosition position1 = new ItemLabelPosition(
View Full Code Here

Examples of javafx.scene.chart.CategoryAxis

    public Snapshot(ReadOnlyLongProperty idProvider, String title, String yAxisTitle) {
        this(idProvider, title, yAxisTitle, null);
    }

    private void initialize() {
        final CategoryAxis xAxis = new CategoryAxis();
        final NumberAxis yAxis = new NumberAxis();
        yAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(yAxis, yUnit, null));
        final LineChart chart = new LineChart(xAxis, yAxis);
        chart.setLegendVisible(false);
        chart.setTitle(title);
View Full Code Here

Examples of org.jfree.chart.axis.CategoryAxis

    // set the visual options
    CategoryPlot plot = barChart.getCategoryPlot();

    // set the X axis labels to be slanted
    CategoryAxis domainAxis = plot.getDomainAxis();
    domainAxis.setCategoryLabelPositions(CategoryLabelPositions.createUpRotationLabelPositions(Math.PI / 3.0));

    // set the range axis to display integers only...
    final NumberAxis rangeAxis = (NumberAxis)plot.getRangeAxis();
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
View Full Code Here

Examples of org.jfree.chart.axis.CategoryAxis

    // set the chart visual options
    CategoryPlot plot = barChart.getCategoryPlot();
   
    // set the X axis labels to be slanted
    CategoryAxis domainAxis = plot.getDomainAxis();
    domainAxis.setCategoryLabelPositions(CategoryLabelPositions.createUpRotationLabelPositions(Math.PI / 3.0));
   
    // set the max width of each bar
    BarRenderer renderer = (BarRenderer) plot.getRenderer();
    renderer.setMaxBarWidth(0.10);
View Full Code Here

Examples of org.jfree.chart.axis.CategoryAxis

      }
     
      /**
       * DOAMIN AXIS settings
       */
      CategoryAxis   domainAxis     = categoryPlot.getDomainAxis();
      domainAxis.setAxisLineVisible(visibility.isAxisLine());
      domainAxis.setTickMarksVisible(visibility.isTickMarks());
      domainAxis.setMinorTickMarksVisible(visibility.isMinerTickMarks());
     
      domainAxis.setLabelPaint(axisLabel);
      domainAxis.setTickLabelPaint(tickLabel);
     
      domainAxis.setCategoryLabelPositions(
          CategoryLabelPositions.createUpRotationLabelPositions(Math.PI / 6.0));
     
      CategoryItemRenderer rendrer = categoryPlot.getRenderer();
      for(int index = 0; index < colors.getSeries().size(); index++){
        rendrer.setSeriesPaint(index, new Color(colors.getSeries().get(index)));
View Full Code Here

Examples of org.jfree.chart.axis.CategoryAxis

  private JFreeChart createChart(final Expression aExpression)
  {
    if (aExpression instanceof BarLineChartExpression)
    {
      final CategoryAxis catAxis = new CategoryAxis("Category");// NON-NLS
      final NumberAxis barsAxis = new NumberAxis("Value");// NON-NLS
      final NumberAxis linesAxis = new NumberAxis("Value2");// NON-NLS

      final CategoryPlot plot = new CategoryPlot(createDataset(), catAxis, barsAxis, new BarRenderer());
      plot.setRenderer(1, new LineAndShapeRenderer());
View Full Code Here

Examples of org.jfree.chart.axis.CategoryAxis

    }

    final Font labelFont = Font.decode(getLabelFont());


    final CategoryAxis categoryAxis = cpl.getDomainAxis();
    categoryAxis.setLabelFont(labelFont);
    categoryAxis.setTickLabelFont(labelFont);
    if (getCategoryTitleFont() != null)
    {
      categoryAxis.setLabelFont(getCategoryTitleFont());
    }
    if (getCategoryTickFont() != null)
    {
      categoryAxis.setTickLabelFont(getCategoryTickFont());
    }

    if (maxCategoryLabelWidthRatio != null)
    {
      categoryAxis.setMaximumCategoryLabelWidthRatio(maxCategoryLabelWidthRatio.floatValue());
    }
    cpl.setDomainGridlinesVisible(showGridlines);
    if (labelRotation != null)
    {
      categoryAxis.setCategoryLabelPositions
          (CategoryLabelPositions.createUpRotationLabelPositions(labelRotation.doubleValue()));
    }

    final String[] colors = getSeriesColor();
    for (int i = 0; i < colors.length; i++)
    {
      renderer.setSeriesPaint(i, parseColorFromString(colors[i]));
    }

    if (lowerMargin != null)
    {
      categoryAxis.setLowerMargin(lowerMargin.doubleValue());
    }
    if (upperMargin != null)
    {
      categoryAxis.setUpperMargin(upperMargin.doubleValue());
    }
    if (categoryMargin != null)
    {
      categoryAxis.setCategoryMargin(categoryMargin.doubleValue());
    }


    final ValueAxis rangeAxis = cpl.getRangeAxis();
    if (rangeAxis instanceof NumberAxis)
View Full Code Here

Examples of org.jfree.chart.axis.CategoryAxis

    if (orientation == null)
    {
      throw new IllegalArgumentException("Null 'orientation' argument.");
    }
    final CategoryAxis categoryAxis = new FormattedCategoryAxis(categoryAxisLabel,
        getCategoricalAxisMessageFormat(), getRuntime().getResourceBundleFactory().getLocale());
    categoryAxis.setCategoryMargin(0.0);
    final ValueAxis valueAxis = new NumberAxis(valueAxisLabel);

    final StackedAreaRenderer renderer = new StackedAreaRenderer();
    if (tooltips)
    {
View Full Code Here

Examples of org.jfree.chart.axis.CategoryAxis

    plot.setForegroundAlpha(foregroundAlpha);

    if (plot instanceof CategoryPlot)
    {
      // Handle rotation of the category labels.
      CategoryAxis axis = ((CategoryPlot)plot).getDomainAxis();
      // it's OK to use deprecated method here; avoiding it means attempting cast operations 
      double labelRotation = getLabelRotation();
      if (labelRotation == 90)
      {
        axis.setCategoryLabelPositions(CategoryLabelPositions.DOWN_90);
      }
      else if (labelRotation == -90) {
        axis.setCategoryLabelPositions(CategoryLabelPositions.UP_90);
      }
      else if (labelRotation < 0)
      {
        axis.setCategoryLabelPositions(
            CategoryLabelPositions.createUpRotationLabelPositions( (-labelRotation / 180.0) * Math.PI));
      }
      else if (labelRotation > 0)
      {
        axis.setCategoryLabelPositions(
            CategoryLabelPositions.createDownRotationLabelPositions((labelRotation / 180.0) * Math.PI));
      }
    }


 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.