Title in Charts

Hello All,
I have a requirement where in i want to Display the chart TITLE like as below,
"XYZ Organisation Report
From 01-May-2001 to 05-May-2005"
Am able to display the 1st line i.e "XYZ Organisation Report", but am not able to get the second line record in the Title. (Tha date should be in second line).
Below is the condition am using currently.
<Title
text="XYZ Organisation Report">
</Title>
Thanks,

<Title text="XYZ Organisation Report" visible="true" />
<Subtitle text="From 01-May-2001 to 05-May-2005" visible="true"/>will show you the titles in two lines.

Similar Messages

  • Dynamic title for Chart created by an xml-file in SAP ChartDesigner

    Hello everybody.
    I created an xml-file with SAP ChartDesigner for using it in my abap program. I import this file as a MIME-Object.
    Everything works fine, i declared my charts and all my values.
    But now I need a dynamic title on the top.
    And know that I can give a title in my xml. But it's not dynamic.
    I looked into the xml file and the path for the title is:
    SAPChartCustomizing
    Elements
    ChartElements
    Title
    and then Caption.
      p_ixml_doc = g_ixml->create_document( ).
      l_encoding = g_ixml->create_encoding( byte_order = if_ixml_encoding=>co_little_endian character_set = 'utf-8' ).
      p_ixml_doc->set_encoding( l_encoding ).
      l_chartdata = p_ixml_doc->create_simple_element( name = 'SAPChartCustomizing' parent = p_ixml_doc ).
      l_elements =   p_ixml_doc->create_simple_element( name = 'Elements' parent = l_chartdata ).
      l_chartelements = p_ixml_doc->create_simple_element( name = 'ChartElements' parent = l_elements ).
      l_title = p_ixml_doc->create_simple_element( name = 'Title' parent = l_chartelements ).
      l_element = p_ixml_doc->create_simple_element( name = 'Caption' parent = l_title ).
      l_element->if_ixml_node~set_value( 'QRK-Mittelwert' ).
    In my opinion, it's the right path :/
    My other values i declare like this.
    l_series = p_ixml_doc->create_simple_element( name = 'Series' parent = l_chartdata ).
      l_series->set_attribute( name = 'label' value = 'TO' ).
      l_series->set_attribute( name = 'customizing' value = 'Series1' ).
      loop at gt_mw into gs_mw.
        lv_tabix = sy-tabix.
        l_point = p_ixml_doc->create_simple_element( name = 'Point' parent = l_series ).
        l_element = p_ixml_doc->create_simple_element( name = 'Value' parent = l_point ).
        l_element->set_attribute( name = 'type' value = 'x' ).
        l_element->if_ixml_node~set_value( lv_tabix ).
        l_element = p_ixml_doc->create_simple_element( name = 'Value' parent = l_point ).
        l_element->set_attribute( name = 'type' value = 'y' ).
        l_element->if_ixml_node~set_value( '35.00' ).
      endloop.
    It works...and i already checked this solution for my title, but it didn't work.
    I call the xml file with the method cl_wb_mime_repository:
    CALL METHOD cl_wb_mime_repository=>load_mime
        EXPORTING
          io              = lv_io
        IMPORTING
          bin_data        = lt_xmlr
        CHANGING
          language        = sy-langu
        EXCEPTIONS
          no_io           = 1
          illegal_io_type = 2
          not_found       = 3
          error_occured   = 4
          OTHERS          = 5.
      CHECK sy-subrc = 0.
    *-- Convert raw to xstring
      CREATE OBJECT lo_conv.
      LOOP AT lt_xmlr INTO ls_xmlr.
        CALL METHOD lo_conv->convert
          EXPORTING
            inbuff    = ls_xmlr
            outbufflg = 25000
          IMPORTING
            outbuff   = lv_xstr.
        CONCATENATE p_xml lv_xstr INTO p_xml IN BYTE MODE.
    Maybe somebody can help me.
    Thanks a lot.

    I got it!
    This thread helped me.
    [http://forums.sdn.sap.com/thread.jspa?threadID=1343796|http://forums.sdn.sap.com/thread.jspa?threadID=1343796]

  • Set data title from chart at runtime

    Is it possible to change the data title from a chart at runtime?
    Or alternativly, can one use a formula as data title, which then can be changed at runtime?

    We have some reports that are in deferent languages. For now I've used formulafields as columnheaders where I change the text at runtime accordingly.
    the text I want to change on the chart is located under
    Chart Expert... > Text (tab) > Data title:
    For now I solve this by drawing a text object over the chart, but this could give problems in the fututre with positioning and such.
    Edited by: Bruno Latte on Mar 23, 2009 3:06 PM

  • Custom Titles for charts with Bind vars

    I have seen several posts on tnese pages regarding doing this very thing for a report. I have done this and it worked fine. But doing the same thing on a chart doesn't . Why?
    I have tried many things making use of wwpro_api_parameters functions. Nothing has so far worked. Can anyone please help.
    null

    use the colour wheel to obtain million + colours:     Inspector > Format > Style > Fill

  • How to use the region parameter of main report for subreport chart titles?

    I am using Crystal Reports 11.
    I create 1 main report with 10 sub-reports that contain cross-tabs & charts. The main report has a parameter regarding 3 different areas: region1, region2, and region3.
    I use the method of adding the u2018regionu2019 parameter of main report to the selection formula of the sub-reports. So, I can select 'region' from main report to controll outputs in sub-reports by region.
    I use formulas for chart titles, e.g.:
    Select {Product Code}
    Case 'a111':
      u2018Region1 u2013 a111 Counts'
    Case u2018b222u2019:
      u2018Region1 u2013 b222 Counts'
    u2026
    u2026
    Default:
    u2026
    Since I pass the u2018regionu2019 parameter of main report to sub-reports, I have to change chart titles dynamically based on the region I select.
    How can I use the region parameter from main report in the formulas to get chart titles dynamically?
    Thank you in advance.

    Thank you.
    I am not using Chart Title with "Chart Expert".
    I am using a formula for chart titles, e.g.:
    Select {Product Code}
    Case 'a111':
      u2018Region1 u2013 a111 Counts'
    Case u2018b222u2019:
      u2018Region1 u2013 b222 Counts'
    u2026
    u2026
    Default:
    u2026
    I drag this formula above the charts and it looks like a dynamic title. So, for product a111, the chart title would be "Region1 u2013 a111 Counts"; for product b222, the chart title would be "Region1 u2013 b222" Counts; and so on ...
    Because I pass the region parameter from master report to subreport, I want to change the region part of the chart titles dynamically.
    For example,
    when select Region1, the chart titles should be: "Region1 u2013 a111 Counts"; "Region1 u2013 b222"; ...
    when select Region2, the chart titles should be: "Region2 u2013 a111 Counts"; "Region2 u2013 b222"; ...
    I want to add the region parameter into the tiltle formula.
    How should I do?

  • How to modify a chart title

    I have created a chart in Keynote with a title. But the title is really close to the data, and I would like to increase the space between title and chart, but I don't know how. I cannot even cheat by adding a return and creating an empty second line below the actual title.
    I know that I could create a seperate textbox to avoid this problem, but I will have to create many charts and I want the distance to be always the same, and I need the feature to turn the title on and off.
    By the way: it is a line chart.
    Message was edited by: How to modify a chart title

    Dear How to modify a chart title,
    I think you're going to have to become accustomed to the default position of the title. You can Provide Feedback to Apple using the form available in the Keynote app menu and tell them that you would like this option on the Chart Title feature. My guess is that it won't be high on their priority list since you do have the text box option to fall back on.
    Good luck,
    Jerry

  • Category Title in a Chart

    Hi, I've just started to use Numbers and have created my first spreadsheet out of the Weight Loss and Running template.
    If I select the weight loss chart and select format and then x axis and switch on Title, the chart shows what looks like a default x axis title of "Category Title"
    Where can I change this to be the title I want?  I assume it comes from the table supplying the data but I cannot find it there.
    Thanks,
    John.

    Hi John,
    In the Mac version of Numbers, Category titles are picked up from the Header column (or Header row) nearest the data cells.
    If the categories are in column A and the data in column B, Column A must be defined as a Header Column if Numbers is to recognize its content as category titles.
    Set the number of Header columns (0 to 5) in the Table menu.
    Convert the leftmost non-header column to a Header column using the pop-up menu in the column reference tab, visible when any cell in the table is selected.
    Process on Numbers for iOS will be similar, but probably not identical.
    Regards,
    Barry

  • Changing a chart title dynamically

    Hi all. I'm on apex 3.1.0. I have a list_item with some values and a chart that depends on the value of this list item. I have no set at the moment title of this chart. What I want is to set title depending on value of my list item. So if value of list item is AAA I want that title of chart is AAA, if BBB then title should be BBB and so on.
    How can I achieve that??
    Thanks for collaboration,
    Fabrizio

    I guess you mean a select list. You could use a select-list-with-submit or select-list-with-redirect item to ultimately redirect back to the page, passing in the selected value name for use as the chart title. Or you could do something with javascript to capture the selected value and save it in session state immediately. Others will have to advise you on these possibilities.
    Scott

  • Multiple axes chart - baseline issue

    Hi all,
    I'm currently working on charts (column, bar, line, ..) with
    multiple axes (each for one series).
    If negative amount values are shown in a chart, the baselines
    (for zero values) appears
    on different coordinates/levels.
    As an example see the code listed below:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    [Bindable]
    public var expenses:ArrayCollection = new ArrayCollection([
    {Month:"Jan", Profit:2000, Expenses:15},
    {Month:"Feb", Profit:1000, Expenses:20},
    {Month:"Mar", Profit:1500, Expenses:50},
    {Month:"Apr", Profit:100, Expenses:-10}
    ]]>
    </mx:Script>
    <mx:Panel title="Column Chart">
    <mx:ColumnChart id="myChart" dataProvider="{expenses}"
    showDataTips="true">
    <mx:horizontalAxis>
    <mx:CategoryAxis dataProvider="{expenses}"
    categoryField="Month"/>
    </mx:horizontalAxis>
    <mx:series>
    <mx:ColumnSeries xField="Month" yField="Profit"
    displayName="Profit">
    <mx:verticalAxis>
    <mx:LinearAxis id="v1"/>
    </mx:verticalAxis>
    </mx:ColumnSeries>
    <mx:ColumnSeries xField="Month" yField="Expenses"
    displayName="Expenses">
    <mx:verticalAxis>
    <mx:LinearAxis id="v2"/>
    </mx:verticalAxis>
    </mx:ColumnSeries>
    </mx:series>
    <mx:verticalAxisRenderers>
    <mx:AxisRenderer placement="left" axis="{v1}"/>
    <mx:AxisRenderer placement="right" axis="{v2}"/>
    </mx:verticalAxisRenderers>
    </mx:ColumnChart>
    <mx:Legend dataProvider="{myChart}"/>
    </mx:Panel>
    </mx:Application>
    I'm using Flex Builder 3.0.2 /Flex SDK 3.2.
    Is this is a bug in flex?
    Am i missing something in the mxml/as, or is there a solution
    or workaround?
    Any hints are highly appreciated.
    Regards,
    Matthias

    The series both work fine on their own, of course, but when
    you mix in a series with a negative value, it causes the "floating
    columns" because the zero-points on the axes don't line up with
    each other.
    My suspicion is that this is expected behavior. This would
    work with other column chart types (like stacked), as long as you
    set allowNegativeForStacked to true (there's an example here:
    http://livedocs.adobe.com/flex/3/html/help.html?content=charts_displayingdata_11.html).
    But since you want clustered columns, it might be a problem.
    If you think it is a bug, you can file one here:
    http://bugs.adobe.com/jira
    hth,
    matt horn
    flex docs

  • Chart legend too wide when using horizontal layout

    I am using a flex chart with about 15 series on it. I've set
    the legend direction variable to "horizontal". However since the
    panel width which contains the chart is fixed, the legend sprawls
    out to the right instead of going "wrapping around" nicely to stay
    within the panel. As a result, you can't read the whole legend when
    looking at the chart. The chart itself stays the proper width, but
    the legend is too wide and can only be seen via using the scrollbar
    to move horizontally. How can that be fixed?

    Solerous, you must create a custom legend. Here's an example
    that uses a grid to lay out the individual grid items. If you have
    a variable number of series, then you can probably come up with
    better logic for laying out the legend, but this should help get
    you going.
    hth,
    matt horn
    flex docs
    <?xml version="1.0"?>
    <!-- charts/CustomLegendInActionScript.mxml -->
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    backgroundColor="white" creationComplete="init()">
    <mx:Script><![CDATA[
    import mx.containers.GridItem;
    import mx.containers.GridRow;
    import mx.graphics.SolidColor;
    import mx.graphics.IFill;
    import mx.charts.LegendItem;
    import mx.charts.Legend;
    import mx.collections.ArrayCollection;
    [Bindable]
    public var expenses:ArrayCollection = new ArrayCollection([
    {Expense:"Taxes", April:2000, May:321, June:131, July:1100,
    August:200, September:1400, October:42},
    {Expense:"Rent", April:1000, May:95, June:313, July:600,
    August:400, September:200, October:52},
    {Expense:"Taxes", April:2000, May:321, June:131, July:90,
    August:500, September:900, October:300},
    {Expense:"Bills", April:100, May:478, June:841, July:400,
    August:600, September:1100, October:150}
    private function init():void {
    for (var i:int = 0; i < myChart.series.length; i++) {
    var li:LegendItem = new LegendItem();
    li.label = myChart.series
    .displayName;
    var sc:SolidColor = myChart.series.getStyle("fill");
    li.setStyle("fill", sc);
    var gi:GridItem = new GridItem();
    if (i < 3) {
    // First row
    gi.addChild(li);
    gr1.addChild(gi);
    } else if (i >= 3 && i < 6) {
    // Second row
    gi.addChild(li);
    gr2.addChild(gi);
    } else if (i >= 6) {
    // Third row
    gi.addChild(li);
    gr3.addChild(gi);
    ]]></mx:Script>
    <mx:Panel title="Bar Chart with Legend" width="500"
    height="600">
    <mx:BarChart id="myChart" dataProvider="{expenses}"
    height="400" showDataTips="true">
    <mx:verticalAxis>
    <mx:CategoryAxis
    dataProvider="{expenses}"
    categoryField="Expense"
    />
    </mx:verticalAxis>
    <mx:series>
    <mx:BarSeries xField="April" displayName="April (in
    $USD)"/>
    <mx:BarSeries
    xField="May"
    displayName="May (in $USD)"
    />
    <mx:BarSeries
    xField="June"
    displayName="June (in $USD)"
    />
    <mx:BarSeries
    xField="July"
    displayName="July (in $USD)"
    />
    <mx:BarSeries
    xField="August"
    displayName="August (in $USD)"
    />
    <mx:BarSeries
    xField="September"
    displayName="September (in $USD)"
    />
    <mx:BarSeries
    xField="October"
    displayName="October (in $USD)"
    />
    </mx:series>
    </mx:BarChart>
    <mx:Grid id="myGrid">
    <mx:GridRow id="gr1">
    </mx:GridRow>
    <mx:GridRow id="gr2">
    </mx:GridRow>
    <mx:GridRow id="gr3">
    </mx:GridRow>
    </mx:Grid>
    </mx:Panel>
    </mx:Application>

  • Crys Reports - Mark the Legend Labels and Chart bar - values custom names

    Hai,
    I want to change the default names/labels of the chart elements (for e.g. bar chart - the labels and values) , in my reports the labels are directly taken from the database columns, how can I change this?,
    Someone please help...
    Thank you in advance.
    Vijay.

    Hi
    You can select the individual elements(for e.g chart title,legend,chart frame,grid lines,individual bars and series risers etc.).
    To do this do a normal left click and then again a left click on the desired object within the chart(which will select the object), and then do a right click which will come up with all possible options.
    Say for e.g you wan't to edit a default data label then follow the steps:
    1. Left click on the chart
    2.Left click on the data label.
    3.Right click>>Chart Options>>Titles
    4.Here you can edit the default title
    Thanks

  • Burrito mobile project charting components

    I have a problem when trying to use the charting components in a Flex Hero mobile project with Flash Builder Burrito.
    The release notes(http://labs.adobe.com/wiki/index.php/Flex_SDK_Hero) of Flex Hero state that the charting components aren't included in a mobile project by default, but that you can add the swc's manually.
    So I created a new "Flex Mobile Project" in Burrito and added the charting swc's (datavisualization.swc and mx.swc) to the project. But when I try to use the Barchart component or any other chart component I get errors in my Flex application because it cannot resolve the component.
    I have a feeling this problem has something to do with the com.adobe.flexide.project.multiplatform.multiplatformnature used in the .project file in a mobile project, but I'm not 100% sure.
    Anyone else having this problem and is there any way to resolve this problem?

    ok, so here's another problem with charting in a mobile project... if I'm not mistaken there's a problem with the mobile skin.
    Although this renders (if you have the datavisualisation.swc and mx.swc and sparkskins.swc in your libs folder) you will not see any text on the axis or in the tooltips.   Does anybody have an explanation and solution?  I'm not understand how the skinning is put together in spark :
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark" title="Home" xmlns:local="*"
            xmlns:mx="library://ns.adobe.com/flex/mx"
            xmlns:charts="mx.charts.*"
            xmlns:datavis="mx.charts.series.*">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
            <fx:Script><![CDATA[
                import mx.collections.ArrayCollection;
                [Bindable]
                public var expenses:ArrayCollection = new ArrayCollection([
                    {Month:"January", Profit:2000, Expenses:1500, Amount:450},
                    {Month:"February", Profit:1000, Expenses:200, Amount:600},
                    {Month:"March", Profit:1500, Expenses:500, Amount:300},
                    {Month:"April", Profit:500, Expenses:300, Amount:500},
                    {Month:"May", Profit:1000, Expenses:450, Amount:250},
                    {Month:"June", Profit:2000, Expenses:500, Amount:700}
            ]]></fx:Script>
            <mx:Panel title="Plot Chart">
                <charts:PlotChart id="myChart" dataProvider="{expenses}"
                              showDataTips="true">
                    <charts:series>
                        <datavis:PlotSeries
                            xField="Expenses"
                            yField="Profit"
                            displayName="Plot 1"
                            />
                        <datavis:PlotSeries
                            xField="Amount"
                            yField="Expenses"
                            displayName="Plot 2"
                            />
                        <datavis:PlotSeries
                            xField="Profit"
                            yField="Amount"
                            displayName="Plot 3"
                            />
                    </charts:series>
                </charts:PlotChart>
                <charts:Legend dataProvider="{myChart}"/>
            </mx:Panel>
    </s:View>

  • Dispatching an ItemClick event from a chart

    I am trying to provide a simple drill down by getting a name
    from a pie slice and then putting the slices contents in a datagrid
    based on that name as a filter.
    I am trying to use an event dispatcher and an event listener,
    but im not exactly sure im doing it right.
    The dispatcher would dispatch when something is clicked, and
    the string item of what is clicked would be passed into the
    remote object. (Not sure how the ItemClick string is passed
    by an event)
    I know i'm a newb with events.... thanks for any input.
    here is the chart component
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Panel xmlns:mx="
    http://www.adobe.com/2006/mxml"
    title="Defect Chart (Status not Closed)" layout="absolute"
    width="100%" height="100%">
    <mx:Script>
    <![CDATA[
    import mx.charts.ChartItem;
    import mx.collections.ArrayCollection;
    //Label function for the Defect Pie Chart
    private function labels(dataItem:Object, field:String
    ,Index:int, dataPercent:Number ):String
    return dataItem.BG_SEVERITY + " " + dataItem.CNT;
    private function ItemClick(name:String):void
    dispatchEvent(new ChartItemEvent.);
    trace("event is dispatched");
    ]]>
    </mx:Script>
    <mx:PieChart id="DefectPie"
    width="100%"
    height="100%"
    showDataTips="true"
    y="40"
    itemClick="{ItemClick(event.hitData.chartItem.item.toString())}"
    >
    <mx:series>
    <mx:PieSeries id="series"
    field="CNT"
    nameField="BG_SEVERITY"
    labelPosition="callout"
    labelFunction="labels"
    >
    This is called in main's init()
    this.addEventListener("name" , ItemClickHandler);
    And this is the handler function:
    private function ItemClickHandler(event:Event):void
    trace(event);
    dataManager.soe_bug_list_detail(event['BG_SEVERITY']);
    }

    JoeADSK,
    This might sound like a bit over-kill but you might go ahead
    and use a seperate EventHandler class and a DTO(Data Transfer
    Object) class to accomplish the event even though you are simply
    sending 1 piece of data.
    Here is an example if you need one:
    ==Event Handler Class==
    package event
    import flash.events.Event;
    import myApp.dto.ChartItemDTO;
    public class ChartClickEvent extends Event
    public var chartName:ChartItemDTO;
    public function ChartClickEvent(chartName:ChartItemDTO,
    type:String)
    super(type);
    this.chartName = chartName;
    override public function clone():Event
    return new ChartClickEvent(chartName, type);
    DTO Class:
    package myApp.dto
    public class ChartItemDTO
    public var name:String;
    public function ChartItemDTO(name:String)
    this.name = name;
    Here is how you use it in your mxml for or whatever:
    import event.ChartClickEvent;
    import myApp.dto.ChartItemDTO;
    DONT FORGET TO ADD THIS EVENT BLOCK:
    <mx:Metadata>
    [Event(name="chartName", type="event.ChartClickEvent")]
    </mx:Metadata>
    HERE IS AN EXAMPLE FUNCTION NON-WORKING===
    private function setChartName(name:String):void
    var chrtName:ChartItemDTO = new ChartItemDTO(name);
    var chrtClickEvent:ChartClickEvent = new
    ChartClickEvent(chrtName, "chartName");
    dispatchEvent(chrtClickEvent);
    Now this is just hacked together quickly not a working model
    but you will get the idea.
    Basically the event must be passed a Data Transfer Object to
    hand off from the Click event.
    Like I said this is over-kill but a good place to start as
    you venture forth in the the Event Handling world in Flex.
    Good luck, hope this helps,
    Kenny

  • Text comments on line chart

    Hi,
    I have a single series flash chart displaying dates on X axis and some values on Y axis. The data comes from a table defined as
    Week_Start DATE;
    Production_Level NUMBER;
    Txt_Comment VARCHAR2(255);
    Some data points have textual comments attached to them (e.g. explanations for unusually high/low production levels) and I wouold like to display them beside the associated points.
    Any ideas on how this can be done would be welcome...
    I use APEX 3.0 with AnyChart 5.1.2 and Oracle 10g
    Many thanks,
    Constantine

    Hi Sergio,
    Thank you for your help.
    This looks promising, except I can't get it to work - would you please take a look at the code I have and let me know what I am doing wrong?
    Here is what my PL/SQL returns and this gets assigned to a hidden page item called P1_TMP_CHART_DATA:
    <data>
    <series name="Series 1">
    <point name="Jan 01" y="0">
    <attributes>
    <attribute name="comment"><!CDATA[NONE]]></attribute>
    </attributes>
    </point>
    <point name="Jan 08" y="96">
    <attributes>
    <attribute name="comment"><!CDATA[NONE]]></attribute>
    </attributes>
    </point>
    </series>
    </data>and here is the XML I have for my chart:
    <?xml version = "1.0" encoding="utf-8" standalone = "yes"?>
    <anychart>
    <margin all="1"/>
    <settings>
    <animation enabled="false"/>
    </settings>
    <charts>
    <chart use_anychart3_data_model="true" use_sets_colors="false">
    <chart_settings>
    <title align_by="Chart" padding="0"><text>Cumulative Net Production</text></title>
    <axes>
      <y_axis>
      <title padding="0">
        <text>boe/d</text>
      </title>
      <major_tickmark inside="True" outside="False" />
      <minor_tickmark inside="False" outside="False" />
      <minor_grid enabled="False" />
      <labels>
        <format>{%Value}{numDecimals:0}</format>
        <font size="10"/>
      </labels>
    </y_axis>
    <x_axis tickmarks_placement="Center">
      <title><text></text></title>
      <major_tickmark inside="False" outside="True" />
      <major_grid enabled="False" />
      <minor_grid enabled="False" />
      <labels rotation="90" padding="0">
        <font size="10"/>
      </labels>
      <scale major_interval="1"/>
    </x_axis>
    <extra>
      <y_axis name="y2" enabled="false">
        <scale minimum="0" maximum="1"/>
      </y_axis>
    </extra>
    </axes>
    <chart_background>
      <inside_margin bottom="0" left="3" right="3" top="6" />
    </chart_background>
    </chart_settings>
    <data_plot_settings default_series_type="Line">
    <interactivity hoverable="False" allow_select="False" use_hand_cursor="False"/>
    <line_series>
      <tooltip_settings enabled="true">
        <format><![CDATA[{%Name}{enabled:False} - {%Value}{numDecimals:0,decimalSeparator:.,thousandsSeparator:\,}]]></format>
        <font family="Tahoma" size="10" color="0x"/>
        <position anchor="Float" valign="Top" padding="10" />
      </tooltip_settings>
      <label_settings enabled="true" mode="Outside" multi_line_align="Center">
        <format><![CDATA[{%comment} - {%Value}{numDecimals:0,decimalSeparator:.,thousandsSeparator:\,}]]></format>
        <background enabled="false"/>
        <font family="Tahoma" size="10" color="0x"/>
      </label_settings>
      <line_style>
        <line enabled="true" thickness="1" opacity="1" />
      </line_style>
      <marker_settings enabled="True" >
        <marker type="Circle" />
      </marker_settings>
    </line_series>
    </data_plot_settings>
    &P1_TMP_CHART_DATA.
    </chart>
    </charts>
    </anychart>Now, the problem is that when I run my page, I get the chart container with a message saying "XML parser failure: The element type must be terminated by the matching end-tag."
    If I replace &P1_TMP_CHART_DATA. in my XML with #DATA# I get to see the chart with some sample data points, so I am guessing the XML itself (axes, title, etc) is probably OK and I messed something up in the definition of &P1_TMP_CHART_DATA.
    Your help would be most appreciated.
    Thanks,
    Constantine
    Edited by: Constantine on Jun 22, 2011 2:42 PM

  • Leaky bar chart - bug?

    using javafx 1.2
    testing javafx.scene.charts
    Looks like there is a memory leak
    Here is a small bar chart app.
    The bars are animated.
    They shrink and grow when clicked on.
    Keep clicking and the app eventually crashes with the following error
    Unexpected exception caught in MasterTimer.process():
    java.lang.OutOfMemoryError: Java heap space
    Just moving the mouse cursor and hovering over different bars seems to use more and more memory
    import javafx.scene.chart.*;
    import javafx.scene.chart.BarChart.*;
    import javafx.scene.chart.part.*;
    import javafx.stage.*;
    import javafx.scene.*;
    import javafx.animation.*;
    var min=0;
    var max=10;
    var bcData: BarChart.Data[];
    var cats:String[];
    for (i in [min..max]){
        insert BarChart.Data {value:i;action : function(){growBar(i);};} into bcData;
        insert "cat{i}" into cats;
    function growBar(i:Integer){
        Timeline {
                keyFrames : [
                    at (0s) {bcData.value =>0},
    at (1s) {bcData[i].value => i}
    }.play();
    def barchart:BarChart = BarChart{
    title : "leaky bar chart"
    valueAxis :NumberAxis{
    label:"values"
    tickUnit :1
    lowerBound:min
    upperBound:max
    categoryAxis :CategoryAxis{
    label:"categories"
    categories :cats
    data: [Series{name:"series1";data:bcData}];
    Stage {
         title:"Bar chart"
         scene : Scene {
              content:[barchart]

    Same problem here. I have a SystemInformationSimulator that generates random data. Trying to plot this using a LineChart overloads the heap after adding around 40 points.
    import javafx.animation.KeyFrame;
    import javafx.animation.Timeline;
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.chart.LineChart;
    import javafx.scene.chart.LineChart.*;
    import javafx.scene.text.Font;
    import javafx.scene.chart.part.NumberAxis;
    var numberOfCores = 4;
    var system = SystemInformationSimulator{
            hostName: "Schildmeer"
            numberOfCores: numberOfCores
    var series: Series[];
    for(i in [0..numberOfCores-1]){
        insert Series{ } into series;
    var x = 0;
    var lowerX = 0;
    var upperX = 20;
    Timeline {
        repeatCount: Timeline.INDEFINITE
        keyFrames : [
            KeyFrame {
                time : 5s
                canSkip : true
                action: function() {
                    system.update();
                    for(i in [0..numberOfCores-1]){
                        var point = Data{
                            xValue: x
                            yValue: system.cpuLoad[i]
                        insert point into series.data;
    if(x >= 20){
    delete series[i].data[0];
    lowerX++;
    upperX++;
    println("inserterd point into series[{i}] with x:{x-1} and y:{point.yValue} series[{i}] has size of {sizeof series[i].data}");
    x++;
    if(x >= 20){
    lowerX++;
    upperX++;
    }.playFromStart();
    Stage {
    title : "Test native graphs"
    scene: Scene {
    width: 600
    height: 600
    content: [
    LineChart{
    xAxis: NumberAxis{
    tickUnit: 2
    lowerBound: bind lowerX
    upperBound: bind upperX
    yAxis: NumberAxis{
    tickUnit: 0.1
    lowerBound: 0
    upperBound: 1
    title: "This is a LineChart"
    titleFont: Font{
    size: 24
    data: bind series

Maybe you are looking for