Jump to content
JChartFX Community

roberthow

Members
  • Posts

    10
  • Joined

  • Last visited

Posts posted by roberthow

  1. My chart has PlotArea, LegendBox, DataGrid from left to right.

    I want to set a title to center, so the code like below:

     -------------------------my code------------------------

    var title = new cfx.TitleDockable();

    title.setText("My Title");

    title.setPlotAreaOnly(false);

    title.setAlignment(cfx.StringAlignment.Center); 

    chart1.getTitles().add(title);

    --------------------------------------------------------------

    The code can not meet my requirement and the method setPlotAreaOnly() seems to just include plot area and margins, it exclude the legend box and data grid.

    Is there any way to make the title centered, not just in plot area and margins, but the whole chart.

  2. 
    
    
    

    my code:

    function loadChart() {

        var chart1 = new cfx.Chart();

        chart1.getData().setSeries(1);

        chart1.getData().setPoints(4);

        chart1.getAllSeries().setGallery(cfx.Gallery.Pie);

    var ann = new cfx.annotation.Annotations();

    var annList = ann.getList();

    var annPic = new cfx.annotation.AnnotationPicture();

    annPic.setPicture("images/dx.jpg");

    //annPic.setMode(cfx.AnnImageMode.Tile);

    annPic.setWidth(370);

    annPic.setHeight(445);

    annPic.setLeft(50);

    annPic.setTop(50);

    annList.add(annPic);

    chart1.getExtensions().add(ann);

        var divHolder = document.getElementById('ChartDiv');

        chart1.create(divHolder);

    }

    ---------------------------------------------------------------

    the problem is  the Pie Chart shows correctly, but annotation picture can not show, it just show as a rectangle.

    There are too little documentation about Annotation APIs in http://support.softwarefx.com/jChartFX/api for reference.

    does any one can let me know what's wrong with the code?

     

    Another Problem is the comment line in the code ( //annPic.setMode(cfx.AnnImageMode.Tile); ), if I uncomment that line and run the code,

    the brower will not show the pie chart and throw error message "Unable to get value of the property 'Tile': object is null or undefined".

    There is already include jchartfx.annotation.js in my code. anyone can help me?

    my system is win7, brower is IE 9, jChartFX version is 7.1.5044.21402 

    Thanks. 

  3. thank you, JuanC

    the problem has been solved.

    In my full html code, it has the directive "<!DOCTYPE html>".

    But before the directive, i add some comments like this:

    -----------------------------------------

    <!-- some comments -->

    <!DOCTYPE html>

    <html>

    .......

    -----------------------------------------

    So when I saw your reply, I open the Developer Tools and found IE9 is in "quirks mode".

    I tried to delete the comments before "<!DOCTYPE html>" , then I found IE9 is in "Standards mode" and the chart has been displayed in my IE9.

    thanks again.

  4. Hi,

    my jChartFX version is 7.1.5044 (7.1.5021 also has this problem) and IE9 version is 9.0.8112.16421, error details is:

    -----------------------------------------------------------------------------

    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E)
    Timestamp: Wed, 6 Nov 2013 01:22:25 UTC


    Message: Unable to get value of the property 'call': object is null or undefined
    Line: 496
    Char: 395
    Code: 0
    URI: http://localhost:8080/JQMTest/js/jchartfx.coreVector.js

    ---------------------------------------------------------------------------------

    html code :

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>jChartFX Test</title>

    <link rel="stylesheet" type="text/css" href="styles/jchartfx.css" />
    <script type="text/javascript" src="js/jchartfx.system.js"></script>
    <script type="text/javascript" src="js/jchartfx.coreVector.js"></script>
    <script type="text/javascript">
    var chart1;
    function loadChart()
    {
    chart1 = new cfx.Chart();
    chart1.getData().setSeries(2);
    chart1.getAxisY().setMin(500);
    chart1.getAxisY().setMax(2000);
    var series1 = chart1.getSeries().getItem(0);
    var series2 = chart1.getSeries().getItem(1);
    series1.setGallery(cfx.Gallery.Lines);
    series2.setGallery(cfx.Gallery.Bar);
    var divHolder = document.getElementById('ChartDiv');
    chart1.create(divHolder);
    }

    </script>
    </head>
    <body onload="loadChart()">
    <div id="ChartDiv" style="width:600px;height:400px;display:inline-block"></div>
    </body>
    </html>

    --------------------------------------------

    these codes works correctly in FireFox and Opera,

    does any one can help me?

×
×
  • Create New...