JavaFX, Display Line Chart with additional text

Hello:
I am new to Java and JavaFX. I have been able to create a line chart that has four series using example code from the Oracle Javafx Documentation home. Below is the syntax used to create the line chart once the series info has been populated:
Scene scene = new Scene(lineChart,800,600);
lineChart.getData().addAll(series1, series2, series3, series4);
When I display the chart, I would also like to display additional text.
My chart measures four different averages by month. I would like to use the text to give more info about each series (ex: 6 month and 1 year total avg for each series). The Line Chart and the text that I want to add do not need to be related. I will calculate the 6 & 12 month avg and list it in the text separately.
I am struggling to find a way to display the line chart with a separate text field. If anyone can point me to some sample code that does something similar I would greatly appreciate it.
Thanks,
Troy

Hi,
My data points in my line chart are an average for a single month for each series.
Ideally I would like a table as shown below centered under the Line Chart if possible (I was unable to use underscores or spaces to build the example. The + signs would really just be a line and the ' are used for spaces):
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++``````````````++``Series 1```++```Series 2```++``Series 3```++``Series 4``++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++6 Month Avg````++```5.6`````++``````7.8 ```++ ````4.8`````++`````8.4``++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++12 Month Avg```++```6.9`````++``````9.3 ```++ ````2.5`````++```5.7````++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Edited by: user8835022 on Jul 26, 2012 3:35 AM

Similar Messages

  • Line chart with different "colors": Values not available are displayed as 0

    Hello,
    I defined a line chart with more than one lines (aka "colors" in the chart wizzard) - each line representing the (monthly) values of a year. x axis are the 12 months of the year; y axis are the values.
    When one defines such a line chart in BIP client there is a choice between sum, average and count for the data values.
    This is no problem for my template as there is only one value per month/year - so I used sum.
    The problem: for the actual year there are no values for future months . But bip nevertheless shows 0 for this month/year... Can one prevent this?
    Regards
    Peter

    Solved it finally - unavailable values must explicitly be passed to the report with nothing contained in the value tag.

  • Line chart with more than 15 data series - color problem

    Hi all,
    I've built a line chart with 32 data series (user can control, which of them are displayed at a time). For series 16 to 32 I did manipulate the URL in the browser directly, because Application Express does only display parametrs for up to 15 series. This works fine so far except of displaying the colors. For each sieries I defined a different color. 29 of my 32 series are displayed in the desired color. But series 29, 31 and 32 are displayed in a default-color (#0099CC). It seems that this is a SVG-problem. In the SVG-source I find the wrong color. When I export my application, I see the right color.
    Thanks for help,
    Chris

    Hello,
    Which version of APEX are you using?
    Go to your Flash Chart attributes - get into your series (click the icon) in the section of Series Query you'll find the maximum rows.
    Regards,
    Dimitri
    -- http://dgielis.blogspot.com/
    -- http://apex-evangelists.com/
    -- http://apexblogs.info/

  • Line Chart with Multiple Series

    Post Author: JayZee
    CA Forum: Charts and Graphs
    HI
    I am trying to create a line chart with multiple series for trend analysis on CR XI but not having much luck, I thought it would be so simple to do!
    My data is provided summarized on the server and is returned as 12 rows:
    Month       Year1        Year2      Year3      Year4     Year5January      100           80          75           90          120February      85           25           40           25          80etc for the rest of the months
    My problem is that I can only get the chart to accept the values to display as a summary and not just as the data pulled back from the server.  I have read an article on the support site for Crystal 6.0  but it doesn't seem to translate well into XI.
    If necessary I could redesign the table to bring back un-summarized data but that is quite a big job.
    Any help greatly appreciated.
    Jay

    Post Author: Tim Wise
    CA Forum: Charts and Graphs
    In the chart expert, put Month in the 'On change of' box and put each year in the 'Show values' box. This puts the month on the x-axis and plots each year as a line.
    Is that what you want?
    I did this in CR 2008 using your data in an Excel sheet.

  • Line chart with 2 different y axis

    hi,
    i have a question on line chart in apex. i'm using apex 4.2. is it possible to generate a line chart with 2 different y axis? here's a sample data to illustrates what i'd like the chart to look like.
    date price percent
    1/1 1 100
    1/2 2 90
    1/3 3 80
    1/4 4 70
    the x-axis will be the date column. the left y-axis would be the price column. and the right y-axis would be the percent column.
    i know i can plot multiple lines in a chart thru different series. but they're based on the same x and y axis range. thanks
    jim

    You beat me to it.
    One of the problems I'm having is that the begining and ending point(s) coincide. So, instead of two completely separate lines, I have an area bounded by the series 1 line on top and the series 2 line on the bottom. Since the points overlay, the values of those points also display one on top of the other. I'll have to see if there is a way to separate the series. I've had 3 separate series before, but never with two y-axis.
    Regards,
    Howard

  • Plot empty point in line chart with previous non empty value

    Hello,
    I have a problem to plot series data in SSRS line chart, with the empty point, I don't want use average and zero provided by the report builder, I want use the last non empty data to fill the empty point, tried to use expression =Previous(Field!Value), no
    luck, any one have some good idea?
    P.S. do not want to use query to fill the null with previous non null value, just from the performance point view. at last , the chart should have some line as square wave with different height, if I use average for empty point, it shows slop wave line which
    is not reflect the real production.
    Thanks
    Richard 

    Hi Richard,
    In Reporting Services, if the chart type is a linear chart type (bar, column, scatter, line, area, range), null values are shown on the chart as empty spaces or gaps between data points in a series. By default, empty points are calculated by taking the average
    of the previous and next data points that are not null.
    If we want to use previous value to replace the empty value, please refer to the following steps:
    Right-click the field which displayed in Y axis (Height) to open the Series Properties.
    In the Value field to modify the expression to look like this:
    =iif(isnothing(Sum(Fields!Height.Value)),previous(sum(Fields!Height.Value)),sum(Fields!Height.Value))
    The following screenshot is for your reference:
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Creating a multi series line chart with different data providers

    I have 3 data providers of the same structure i.e ArrayCollection of DataElement and want to use them to create a multiseries line chart. I do not have just 1 dataProvider that can be used but 3 different data providers of the same structure that i want to use each for different series.
    [Bindable] private var orangeSales : ArrayCollection =
                    new ArrayCollection(
                        [ { sales: 101000, month: new Date( '01/01/2008' ) },
                            { sales: 960000, month: new Date( '02/01/2008' ) },
                            { sales: 475000, month: new Date( '03/01/2008' ) },
                            { sales: 425000, month: new Date( '04/01/2008' ) }
                [Bindable] private var appleSales : ArrayCollection =
                    new ArrayCollection(
                        [ { sales: 991000, month: new Date( '01/01/2008' ) },
                            { sales: 140000, month: new Date( '02/01/2008' ) },
                            { sales: 565000, month: new Date( '03/01/2008' ) },
                            { sales: 255000, month: new Date( '04/01/2008' ) }
                [Bindable] private var bananaSales : ArrayCollection =
                    new ArrayCollection(
                        [ { sales: 891000, month: new Date( '01/01/2008' ) },
                            { sales: 147560, month: new Date( '02/01/2008' ) },
                            { sales: 295000, month: new Date( '03/01/2008' ) },
                            { sales: 574000, month: new Date( '04/01/2008' ) }
    I want to create a line chart with orangeSales, appleSales and bananaSales as three different lines on the chart for different dates specified.
    <mx:ColumnChart showDataTips="true" >
            <mx:horizontalAxis>
                <mx:CategoryAxis
                    dataProvider="{orangeSales}"
                    categoryField="month"
                    />
            </mx:horizontalAxis>
            <mx:series>
                <mx:LineSeries displayName="OrangeSales" yField="sales" xField="month" dataProvider="{orangeSales}"/>
                <mx:LineSeries displayName="AppleSales" yField="sales" xField="month" dataProvider="{appleSales}"/>
                <mx:LineSeries displayName="BananaSales" yField="sales" xField="month" dataProvider="{bananaSales}"/>
            </mx:series>
    </mx:ColumnChart>
    Please help!

    Sorry for the confusion. Actually I must be doing some thing wrong like using ColumnChart to display a line chart or something like that.
    I have now realized that a multi series line chart can be built by having a different data provider for each of the LineSeries object.
    So the code below would create a multi series line graph :
    [Bindable] private var orangeSales : ArrayCollection =
                    new ArrayCollection(
                        [ { sales: 101000, month: new Date( '01/01/2008' ) },
                            { sales: 960000, month: new Date( '02/01/2008' ) },
                            { sales: 475000, month: new Date( '03/01/2008' ) },
                            { sales: 425000, month: new Date( '04/01/2008' ) }
                [Bindable] private var appleSales : ArrayCollection =
                    new ArrayCollection(
                        [ { sales: 991000, month: new Date( '01/01/2008' ) },
                            { sales: 140000, month: new Date( '02/01/2008' ) },
                            { sales: 565000, month: new Date( '03/01/2008' ) },
                            { sales: 255000, month: new Date( '04/01/2008' ) }
                [Bindable] private var bananaSales : ArrayCollection =
                    new ArrayCollection(
                        [ { sales: 891000, month: new Date( '01/01/2008' ) },
                            { sales: 147560, month: new Date( '02/01/2008' ) },
                            { sales: 295000, month: new Date( '03/01/2008' ) },
                            { sales: 574000, month: new Date( '04/01/2008' ) }
    I want to create a line chart with orangeSales, appleSales and bananaSales as three different lines on the chart for different dates specified.
    <mx:ColumnChart showDataTips="true" >
            <mx:horizontalAxis>
                <mx:CategoryAxis
                    dataProvider="{orangeSales}"
                    categoryField="month"
                    />
            </mx:horizontalAxis>
            <mx:series>
                <mx:LineSeries displayName="OrangeSales" yField="sales" xField="month" dataProvider="{orangeSales}"/>
                <mx:LineSeries displayName="AppleSales" yField="sales" xField="month" dataProvider="{appleSales}"/>
                <mx:LineSeries displayName="BananaSales" yField="sales" xField="month" dataProvider="{bananaSales}"/>
            </mx:series>
    </mx:ColumnChart>

  • Line chart with different length series?

    Hello,
    I would like to draw a line chart with three different series.
    1. Previous year
    2. Current year (until now)
    3. Estimate (2 months)
    I've got 12 values for the previous year, 4 values for the current year (January to April) and 2 estimated values for May and June.
    When I define the three series, each is stretched over the whole width of the chart. How can I avoid that and force for instance the April values to be displayed above each other? Is it possible at all with this type of chart? (In Excel, it's quite easy...)
    Thanks for any help!
    Sabine

    Hi,
    You’ll have to write a query for your series 2 and 3 that has the same number of data points as your series 1 query, in your example that would be 12. Line series charts are always stretched over the full width by design. The months for which you have no data, would have a value of NULL. Please note that there is one issue, which has been fixed in 2.2, that causes the charting engine to only render dots instead of lines for series 2, 3, …, if they have a NULL value at the last data point. So if I understand your requirements correctly, you should try this on our 2.2 hosted beta instance, and then upgrade to 2.2 when it comes out.
    Regards,
    Marc

  • How to limit data range in a Line chart with Time Refresh Control

    Hi All,
    I have a Line chart with Time Refresh Control and I would like to make some constraints to this navigation.
    For example, I would like to limit the user to navigate in a data range of 8 hours.
    Is this posible?
    Thanks in advance

    Hi Pedro,
    as far as I know, this is not possible using the time controls on an iChart. However, you may have some success by using your own time controls which call JavaScript methods exposed by the applet.
    For example, you could begin by hiding the time and calendar buttons on an iChart, and creating some buttons of your own. For instance, to set the start date of a query (and thus the start date of the iChart using the query), you can use the following:
    document.getElementById("appletID").getQueryObject().setStartDate(<date string>);
    Using code like the above (look into the xMII script assistant and documentation), you should be able to build time controls which satisfy your requirements. The exact format of <date string> in the sample above will depend on the date format defined in the query template this script calls.
    Hope this helps,
    Sascha

  • How do i change the background display to white with black text. It is white text on blackbackground right now

    Why is my screen display black background with white text?  How can i change back to black text on white background?

    Change it in Settings > General > Accessibility.

  • Flash line chart with multiple lines

    Here a newbie with apex...
    Created a flash line chart with as source the following sql statement:
    select null link, year, sum(total_cost) from cost
    group by year
    a chart has been created with a single line. i wanted every year on an own line.
    The way i could do this is with multiple series like:
    select null link, year, sum(total_cost) from cost
    where year =2008
    select null link, year, sum(total_cost) from cost
    where year =2009
    But this not a good solition, cause now i've to add every year a new serie
    hope to get some help from here... txn in advanced.

    tnx for your reply...
    I will explain myself more by a picture of the wanted result, see below:
    [Click here for the example image|http://img44.imageshack.us/img44/3444/grapha.jpg]
    In your reply you wright you think i can create the graph with pl/sql process. After seeing my example you still think that's needed?
    Hope you or some else can help... tnx in advanced.
    greetings

  • Line Chart with more than 15 datapoints

    I'm using Apex 3.1.
    I am trying to create a line chart with more than 15 data points. Apparently 15 is the default. Question is, How do I change the default?
    The Wiki has advice for changing the "Maximum Rows" parameter, but "Maximum Rows" is not to be found, either in the chart attributes or series attributes.
    http://wiki.shellprompt.net/bin/view/Apex/ChartIssues
    I have encountered this limitation with SVG line charts and Flash line and scatter charts. Seems like it must be an easy thing to figure out; I feel embarassed asking such a question. But I've been through all the application property pages, much of the documentation, and several tutorials... Where can I change this? It's driving me nuts!
    Thanks
    Fred

    Hello,
    Which version of APEX are you using?
    Go to your Flash Chart attributes - get into your series (click the icon) in the section of Series Query you'll find the maximum rows.
    Regards,
    Dimitri
    -- http://dgielis.blogspot.com/
    -- http://apex-evangelists.com/
    -- http://apexblogs.info/

  • Problem creating line chart with character data

    Post Author: burkartt
    CA Forum: Charts and Graphs
    CR Developer v. 11.5.0.313
    I want to create a line chart with data from a SQL2K table to show how much server time each application uses per day. All data is defined a character.
    HWA,4/24/2007,01:44.6HWA,4/25/2007,12.28HWB,4/24/2007,4.6HWC,4/24/2007,55.55HWC,4/25/2007,01:22.3HWE,4/24/2007,01:16.1HWE,4/25/2007,0.59
    I want one horizontal line per application where the X-axis represents the date and the Y-axis represents the server time. I have tried all column combinations for "On Change Of" and "Show Value(s)". What confuses me is why are Count and Discount the only Summary Options for the "Show Value(s)" data?
    Thank you,
    tim

    Post Author: V361
    CA Forum: Charts and Graphs
    I created a group based on date, day, then created the chart and put it in the group footer, on change of server, show sum of time, you will get a seperate chart for each day.  I am not sure if this will help, or will just do.  Since you have CR XI, you may want to look at the gauge chart also....

  • Multiple Line Charts with Column Chart

    I want to show two line charts with a column chart.  Everything goes on the screen fine, except the two line charts origination point always starts at the same point despite the numbers being different.  For example, the ls1 might read 280, 190, 180 and the ls2 is 175, 188, 177 but both origination points start at 280.  The other two datapoints should also be close together but they have a substantial gap of about 50 between them.  Obviosuly I want to have two separate lines.  I have also tried moving the line series below the first lines series with no success.
    <mx:ColumnChart dataTipFunction="formatDataTip"id="
    myChart" dataProvider="
    {FCVData}" showDataTips="
    true"selectionMode="
    single"change="event.stopImmediatePropagation()"
    width="
    100%" height="95%" y="50">
    <!-- vertical axis -->
    <mx:verticalAxis>
    <mx:LinearAxis title="mytitle" labelFunction="defineVerticalLabel"id="
    v1"baseAtZero="
    true" />
    </mx:verticalAxis>
    <mx:horizontalAxis>
    <mx:CategoryAxis dataProvider="
    {MYData}" categoryField="
    YEAR" 
    />
    </mx:horizontalAxis>
    <mx:series>
    <mx:ColumnSeries id="
    pb"color="
    #FFFFFF"xField="
    YEAR" yField="B
    UDGET" displayName="
    Budget"hideDataEffect="
    zoomOut" showDataEffect="
    zoomIn">
    <mx:fill>
    <mx:SolidColor color="{colColor1}"/>
    </mx:fill>
    </mx:ColumnSeries>
    <mx:LineSeries id="ls2" dataProvider="
    {MYData}" yField="
    ACTUAL"displayName="
    Actual" 
    >
    <mx:itemRenderer>  
    <mx:Component>  
    <mx:DiamondItemRenderer/>  
    </mx:Component>  
    </mx:itemRenderer>  
    <mx:lineStroke>
    <mx:Stroke color="
    {lineColor2}" weight="
    5" alpha="
    .5" 
    />
    </mx:lineStroke>  
    <mx:verticalAxis>
    <mx:LinearAxis id="v3" baseAtZero="true"/>
    </mx:verticalAxis>
    </mx:LineSeries>
    <mx:ColumnSeries
    id="
    asytd"color="
    #FFFFFF"xField="
    YEAR" yField="
    SPEND" displayName="
    Spend "hideDataEffect="
    zoomOut" showDataEffect="
    zoomIn">
    <mx:fill>
    <mx:SolidColor color="{colColor2}"/>
    </mx:fill>
    </mx:ColumnSeries>
    <mx:LineSeries id="ls1" dataProvider="
    {MYData}" yField="
    PLAN"displayName="
    Plan" 
    >
    <mx:itemRenderer>  
    <mx:Component>  
    <mx:CrossItemRenderer/>  
    </mx:Component>  
    </mx:itemRenderer>  
    <mx:lineStroke>
    <mx:Stroke color="
    {lineColor1}" weight="
    5" alpha="
    .5" 
    />
    </mx:lineStroke>  
    <mx:verticalAxis>
    <mx:LinearAxis title="title" id="v2" baseAtZero="true"/>
    </mx:verticalAxis>
    </mx:LineSeries>
    </mx:series>
    <mx:verticalAxisRenderers>
    <mx:AxisRenderer placement="left" axis="{v1}"/>
    <mx:AxisRenderer placement="right" axis="{v2}"/>
    <mx:AxisRenderer visible="false" placement="right" axis="{v3}"/>
    </mx:verticalAxisRenderers>
    </mx:ColumnChart>

    Hi,
    Still Trying:
    I've now got this code to function:
    var i:int = 0;
                    for each (var cat:* in event.result.chart.categories.category){
                        //mx.controls.Alert.show(cat.label);
                        var z:int = 0;
                        for each (var valuee:* in event.result.chart.dataset){
                            //mx.controls.Alert.show(event.result.chart.dataset[z].seriesName);
                            //mx.controls.Alert.show(valuee.sete[i].value);
                            z++;
                        i++
    which works fine, how can I get in into Array to make a dataset for the flex charts?
    Thanks,
    Elad

  • JavaFX line chart with data labels onMouseOver

    Hello
    Is it possible to show the value of a data point in a line chart?
    Here is an example but in flash: [Example of Data labels|http://www.fusioncharts.com/Demos/Blueprint/Default.asp]

    Hi
    I don't use the scene.chart routines but have implemented my own chart with the feature you want - see www.eco-wand.com demonstration which has the feature you wand in the History scene.
    To achieve this, I use the onMouseMoved function to give me the x position within the chart rectangle. I use this to look up my data sequence to get the values which I then display as text.
    abg

Maybe you are looking for