Jump to content
Software FX Community

AndreG

Staff
  • Posts

    333
  • Joined

  • Last visited

Posts posted by AndreG

  1. Rendering as SVG is an option in Chart FX for Java Server, but not an option for exporting in Chart FX for Java Desktop. There is no way of exporting the chart as vectors. Out of relying on software that converts bitmaps into vector images (which I would not necessarily recommend), I am not sure how you would be able to accomplish this.

  2. To change the DPI of the chart you would need to create a Graphics object from a high resolution Bitmap and then use the Paint method to paint the chart to the Graphics. Here is the code you are looking for (for 300 DPI, for example).

    Rectangle r = new Rectangle (0, 0, (chart1.Width * 300) / 96, (chart1.Height * 300) / 96); Bitmap bmp = new Bitmap (r.Width, r.Height); bmp.SetResolution(300, 300); Graphics g = Graphics .FromImage(bmp); chart1.Paint(g, r, PaintStyles .Background | PaintStyles .Border | PaintStyles .Print); bmp.Save( @"c:\temp\cfxdpi.bmp" ); g.Dispose(); bmp.Dispose();

    You can save the file in different formats:

    bmp.Save( @"c:\temp\cfx.jpg" , ImageFormat .Jpeg); bmp.Save( @"c:\temp\cfx.gif" , ImageFormat .Gif); bmp.Save( @"c:\temp\cfx.tif" , ImageFormat .Tiff);

     Then try printing the image file.

  3. Please make sure you have the following on your web.xml file:

      <filter>   <filter-name>ChartCallbackFilter</filter-name>   <filter-class>com.softwarefx.chartfx.server.servlets.ChartCallbackFilter</filter-class>   </filter>   <filter-mapping>   <filter-name>ChartCallbackFilter</filter-name>   <url-pattern>/*</url-pattern>   </filter-mapping>

  4. I believe that permissions change depending on what features of the chart you are using. It would be easier for you to just increase trust using the microsoft tool Caspol until you get to a level where it works. Also, try moving that site to trusted site and lowering the security on Internet Explorer (Tools/Internet Options/Security).

    Please note that Microsoft is raising this bar for a reason, and if you choose to keep using this technology you should do so at your own risk. Whenever possible we always recommend that you render the chart as an image and take advantage of the Ajax interactivity options.

  5. <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>JSP Page</title>
      </head>
      <body>
    <%
    com.softwarefx.chartfx.server.ChartServer chart1 = new com.softwarefx.chartfx.server.ChartServer(pageContext, request, response);
    chart1.setID("chart1");
    chart1.setWidth(600);
    chart1.setHeight(400);

    chart1.setAsFirstChart();

    chart1.renderControl();

    com.softwarefx.chartfx.server.ChartServer chart2 = new com.softwarefx.chartfx.server.ChartServer(pageContext, request, response);
    chart2.setID("chart2");
    chart2.setWidth(600);
    chart2.setHeight(400);
    chart2.renderControl();

    com.softwarefx.chartfx.server.ChartServer chart3 = new com.softwarefx.chartfx.server.ChartServer(pageContext, request, response);
    chart3.setID("chart3");
    chart3.setWidth(600);
    chart3.setHeight(400);

    chart3.setAsLastChart();

    chart3.renderControl();
    %>
      </body>
    </html>

  6. Hi Skchai,

     Your image did not post, but I think I know what you are talking about. Try this:

    chart1.Data.Series = 3;


    chart1.Data.Points = 5;

    Random r = new Random();


    for (int i = 0; i < chart1.Data.Series; i++) {


    for (int j = 0; j < chart1.Data.Points; j++) {


    chart1.Data[i, j] = r.Next(100);


    }


    }



    chart1.AllSeries.Border.UseForLines =

    true;


    chart1.AllSeries.Border.Effect =

    BorderEffect.None;


    for (int i = 0; i < chart1.Series.Count; i++)


    chart1.Series.Border.Color = chart1.Series.Color;



    chart1.AllSeries.MarkerSize = 10;



    chart1.Points[1, 2].Color =

    Color.Pink;

×
×
  • Create New...