Examples of ChartFont


Examples of org.krysalis.jcharts.properties.util.ChartFont

        getY( index, 1 ) );

      Rectangle2D bounds = g.getFontMetrics().getStringBounds( label, g );

      // draw axis label
      ChartFont cfont = props.getTitleChartFont();
      if( cfont != null )
      {
        g.setFont( cfont.getFont() );

      }
      g.drawString(
        label,
        (int) ( getX( index + 1, 1 ) - bounds.getWidth() / 2 ),
View Full Code Here

Examples of org.krysalis.jcharts.properties.util.ChartFont

    legendProperties = new LegendProperties();
    chartProperties = new ChartProperties();
    axisProperties = new AxisProperties(false);

    ChartFont axisScaleFont = new ChartFont(new Font("Arial Narrow", Font.PLAIN, 10), Color.black);
    axisProperties.getXAxisProperties().setScaleChartFont(axisScaleFont);
    axisProperties.getYAxisProperties().setScaleChartFont(axisScaleFont);

    ChartFont axisTitleFont = new ChartFont(new Font("Arial Narrow", Font.PLAIN, 13), Color.black);
    axisProperties.getXAxisProperties().setTitleChartFont(axisTitleFont);
    axisProperties.getYAxisProperties().setTitleChartFont(axisTitleFont);

    ChartFont titleFont = new ChartFont(new Font("Georgia Negreta cursiva", Font.PLAIN, 15), Color.black);
    chartProperties.setTitleFont(titleFont);

    //On fixe la marge avec le cadre
    // Set the margin within the frame
    chartProperties.setEdgePadding(2f);

    //On met le graphe sur un fond gris clair
    // Set the chart against a plain grey background
    axisProperties.setBackgroundPaint(new Color (245, 245, 245));

    //Param�trage de la bo�te de l�gende
    //Parameters for the legend box
    //legendProperties.setPlacement(LegendAreaProperties.RIGHT);
    //legendProperties.setNumColumns(1);
    //legendProperties.setFont( new Font("Arial Narrow", Font.PLAIN, 13) );
    //legendProperties.setFontPaint(Color.black);
    ChartFont legendFont = new ChartFont(new Font("Arial Narrow", Font.PLAIN, 13), Color.black);
    legendProperties.setChartFont(legendFont);
    legendProperties.setChartPadding(10);

    //Arrondi � la puissance 10
    //Round up to the power of 10
View Full Code Here

Examples of org.krysalis.jcharts.properties.util.ChartFont

      //magnitude greater
      if (maxDataClustAbs>10*maxDataLineAbs) {   
        axisProperties.getYAxisProperties().setShowRightAxis(true);
        secondScale=Math.round(maxDataClustAbs/(maxDataLineAbs));
        axisProperties.getYAxisProperties().setSecondScaleRight((float) (secondScale) );
        ChartFont axisScaleFontRight = new ChartFont( new Font("Arial Narrow", Font.PLAIN, 10), Color.green.darker() );
        axisProperties.getYAxisProperties().setScaleChartFontRight( axisScaleFontRight );
      }

      //On v�rifie s'il y a des valeurs n�gatives
      // Check if there are negative numbers
View Full Code Here

Examples of org.krysalis.jcharts.properties.util.ChartFont

    DataSeries dataSeries = new DataSeries( xAxisLabels, "Years", "Incidence", "Micro$oft At Work"  );
    dataSeries.addIAxisPlotDataSet( axisChartDataSet );

    ChartProperties chartProperties= new ChartProperties();
    chartProperties.setEdgePadding( 20 );
    chartProperties.setTitleFont( new ChartFont( new Font( "Georgia Negreta cursiva", Font.PLAIN, 14 ), Color.black ) );

    AxisProperties axisProperties= new AxisProperties( false );
    axisProperties.setXAxisLabelsAreVertical( true );
    axisProperties.getYAxisProperties().setShowGridLines( AxisTypeProperties.GRID_LINES_ALL );

    ChartFont scaleFont= new ChartFont( new Font( "Georgia Negreta cursiva", Font.PLAIN, 13 ), Color.black );
    axisProperties.getXAxisProperties().setScaleChartFont( scaleFont );
    axisProperties.getYAxisProperties().setScaleChartFont( scaleFont );

    ChartFont axisTitleFont= new ChartFont( new Font( "Arial Narrow", Font.PLAIN, 12 ), Color.black );
    axisProperties.getXAxisProperties().setAxisTitleChartFont( axisTitleFont );
    axisProperties.getYAxisProperties().setAxisTitleChartFont( axisTitleFont );

    LegendProperties legendProperties= new LegendProperties();
    AxisChart axisChart= new AxisChart( dataSeries, chartProperties, axisProperties, legendProperties, 500, 400 );
View Full Code Here

Examples of org.krysalis.jcharts.properties.util.ChartFont

    DataSeries dataSeries = new DataSeries( xAxisLabels, "Years", "Incidence", "Micro$oft At Work"  );
    dataSeries.addIAxisPlotDataSet( axisChartDataSet );

    ChartProperties chartProperties= new ChartProperties();
    chartProperties.setEdgePadding( 20 );
    chartProperties.setTitleFont( new ChartFont( new Font( "Georgia Negreta cursiva", Font.PLAIN, 14 ), Color.black ) );

    AxisProperties axisProperties= new AxisProperties( false );
    axisProperties.setXAxisLabelsAreVertical( true );
    axisProperties.getYAxisProperties().setShowGridLines( AxisTypeProperties.GRID_LINES_ALL );

    ChartFont scaleFont= new ChartFont( new Font( "Georgia Negreta cursiva", Font.PLAIN, 13 ), Color.black );
    axisProperties.getXAxisProperties().setScaleChartFont( scaleFont );
    axisProperties.getYAxisProperties().setScaleChartFont( scaleFont );

    ChartFont axisTitleFont= new ChartFont( new Font( "Arial Narrow", Font.PLAIN, 12 ), Color.black );
    axisProperties.getXAxisProperties().setAxisTitleChartFont( axisTitleFont );
    axisProperties.getYAxisProperties().setAxisTitleChartFont( axisTitleFont );

    LegendProperties legendProperties= new LegendProperties();
    AxisChart axisChart= new AxisChart( dataSeries, chartProperties, axisProperties, legendProperties, 500, 400 );
View Full Code Here

Examples of org.krysalis.jcharts.properties.util.ChartFont

  public void init()
  {
    this.legendProperties = new LegendProperties();
    this.chartProperties = new ChartProperties();
    this.axisProperties = new AxisProperties( true );
    ChartFont axisScaleFont = new ChartFont( new Font( "Georgia Negreta cursiva", Font.PLAIN, 13 ), Color.black );
    axisProperties.getXAxisProperties().setScaleChartFont( axisScaleFont );
    axisProperties.getYAxisProperties().setScaleChartFont( axisScaleFont );

    ChartFont axisTitleFont = new ChartFont( new Font( "Arial Narrow", Font.PLAIN, 14 ), Color.black );
    axisProperties.getXAxisProperties().setTitleChartFont( axisTitleFont );
    axisProperties.getYAxisProperties().setTitleChartFont( axisTitleFont );

    ChartFont titleFont = new ChartFont( new Font( "Georgia Negreta cursiva", Font.PLAIN, 14 ), Color.black );
    this.chartProperties.setTitleFont( titleFont );
  }
View Full Code Here

Examples of org.krysalis.jcharts.properties.util.ChartFont

    legendProperties.setPlacement( (int) TestDataGenerator.getRandomNumber( 4 ) );

    fontSize=(int) TestDataGenerator.getRandomNumber( 6, 20 );
    font=ALL_FONTS[ (int) TestDataGenerator.getRandomNumber( ALL_FONTS.length ) ];
    font=font.deriveFont( (float) fontSize );
    legendProperties.setChartFont( new ChartFont( font, TestDataGenerator.getRandomPaint() ) );


    //---random between null and having a color.
    if( (int) TestDataGenerator.getRandomNumber( 2 ) == 0 )
    {
View Full Code Here

Examples of org.krysalis.jcharts.properties.util.ChartFont

  /*************************************************************************************************/
  private void fonts() throws Throwable
  {
    LegendProperties legendProperties= new LegendProperties();
    legendProperties.setChartFont( new ChartFont( new Font( "Georgia Negreta cursiva", Font.PLAIN, 13 ), Color.red ) );

    super.exportImage( this.getChart( legendProperties ), "legendFonts" );
  }
View Full Code Here

Examples of org.krysalis.jcharts.properties.util.ChartFont

    AxisChart axisChart = new AxisChart( dataSeries, new ChartProperties(), new AxisProperties(), new LegendProperties(), width, height );
    super.exportImage( axisChart, "axisTitles" );

    AxisProperties axisProperties = new AxisProperties();
    ChartFont yAxisFont = new ChartFont( new Font( "Arial Narrow", Font.BOLD, 14 ), Color.blue );
    axisProperties.getYAxisProperties().setAxisTitleChartFont( yAxisFont );

    axisChart = new AxisChart( dataSeries, new ChartProperties(), axisProperties, new LegendProperties(), width, height );
    super.exportImage( axisChart, "axisTitleFont" );
  }
View Full Code Here

Examples of org.krysalis.jcharts.properties.util.ChartFont

  /*****************************************************************************************/
  private void scaleFont() throws ChartDataException
  {
    AxisProperties axisProperties = new AxisProperties();
    ChartFont xScaleChartFont = new ChartFont( new Font( "Georgia Negreta cursiva", Font.PLAIN, 13 ), Color.blue );
    axisProperties.getXAxisProperties().setScaleChartFont( xScaleChartFont );
    super.exportImage( this.getChart( axisProperties ), "scaleFont" );
  }
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.