Barchart with single value

Hello.
I would like to know why, when I provide to my barchart component a data provider with only one value, the height of the corresponding bars is scaled to about 1 pixel. However if I add a second value, even null, the height become correct again.
Thanks.

There is the result of the code below
<?xml version="1.0" encoding="utf-8"?><s:Application 
xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768">
     <fx:Script>
     <![CDATA[
          private var dataProvider:Array = [{value:10}];
     ]]> 
     </fx:Script>
     <mx:BarChart dataProvider="{dataProvider}">  
          <mx:series>
               <mx:BarSeries xField="value"/>  
          </mx:series>
     </mx:BarChart>
</s:Application>
Just replace the sixth line of this code by
private  var dataProvider:Array = [{value:10}, {value:15}];
and you will obtain a nice looking barchart

Similar Messages

  • Creation of Variable with single values in BPS

    Dear All,
    I have a very basic requirement in creating variables that would accept single values from the user in BPS.
    Could anyone pls provide me the steps in doing so?
    I am able to create and use varibles with value ranges but could not find the option to create variables with  single values.
    Regards,
    Srini.

    Hi Raj,
    I have already been  thru SAP help file but,  though it says we can create variables with single values, it does not  provide any steps in creating it.
    Any suggestions?
    Regards,
    Srinivas Kamireddy.
    Edited by: Srinivas Kamireddy on Apr 25, 2008 7:59 PM

  • BarChart with single negative value

    mxml code is as follows:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    creationComplete="myData.send()" horizontalAlign="left"
    verticalAlign="top">
    <mx:HTTPService id="myData" url="negative.xml" />
    <mx:VBox >
    <mx:BarChart id="bc1"
    dataProvider="{myData.lastResult.distribution.point}"
    showDataTips="true" >
    <mx:series>
    <mx:BarSeries xField="y" />
    </mx:series>
    <mx:verticalAxis>
    <mx:CategoryAxis categoryField="x" />
    </mx:verticalAxis>
    </mx:BarChart>
    </mx:VBox>
    </mx:Application>
    The data file, negative.xml, is as follows:
    <distribution>
    <point> <x> A </x> <y> -200
    </y> </point>
    </distribution>
    As it stands, nothing appears in the chart.
    If you change the -200 to 200, it works! Rather bizarre!
    Anyone have a work around?

    I subclassed LinearAxis and this get's the correct minimum
    value.
    --------- modified example ---------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:local="*" xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    creationComplete="myData.send()" horizontalAlign="left"
    verticalAlign="top">
    <mx:HTTPService id="myData" url="negative.xml" />
    <mx:VBox >
    <mx:BarChart id="bc1"
    dataProvider="{myData.lastResult.distribution.point}"
    showDataTips="true" >
    <mx:series>
    <mx:BarSeries xField="y" />
    </mx:series>
    <mx:horizontalAxis>
    <local:MyLinearAxis />
    </mx:horizontalAxis>
    <mx:verticalAxis>
    <mx:CategoryAxis categoryField="x" />
    </mx:verticalAxis>
    </mx:BarChart>
    </mx:VBox>
    </mx:Application>
    ----- MyLinearAxis.as -------------------
    package
    import mx.charts.LinearAxis;
    public class MyLinearAxis extends LinearAxis
    public function MyLinearAxis()
    super();
    override protected function adjustMinMax(minValue:Number,
    maxValue:Number):void
    super.adjustMinMax(minValue,maxValue);
    if(dataDescriptions.length){
    computedMinimum = this.dataDescriptions[0].min;
    I think this should do the trick.
    -Kurt

  • Load BarChart with DB values

    Dear All -
    I need to fetch values from Db tables and feed them to Barchart API.
    What should be the best practice I should follow to set all Barchart parameters in a single DB query itself ?
    A sample psuedo-code would be helpful.
    Regards.

    Change the control file as below and try it
    OPTIONS (DIRECT=TRUE, ERRORS=0, SKIP=1)
    load data
    infile 'C:\sample.csv'
    APPEND
    into table TABLE1
    WHEN (DATE_<>'DATE_')
    fields terminated by "," optionally enclosed by '"'
    TRAILING NULLCOLS
    DATE_      "TO_DATE(:DATE_,'YYYY-MM-DD')",
    ID,
    RID,
    NAME,
    NAME2,
    ITEM,
    START1      "TO_DATE(:START1,'YYYY-MM-DD HH24:MI:SS')",
    STOP        "TO_DATE(:STOP,'YYYY-MM-DD HH24:MI:SS')"

  • Line graph with single values as dots

    Dear Apex experts,
    I have the requirement to create a graph in Apex which displays technical values as dots or candles and limit values and average values as lines in one graph.
    Is there a way to create two types of graphs in one image ?
    Best regards,
    Daniel

    Hi,
    as far as I know, you can't have interruptes series in the DVT line graph
    Frank

  • BPS: Possible to limit a variable to a single value?

    Hello,
    I have a BPS variable which is available in the planning folders so the user can change the value himself.
    For a planning layout, one and only one value is required, as the system otherwise wouldn't know which value to use when saving data. It is possible though for the user to select both a mix of values and ranges. I see the lowest value is always used. Consequently this is not technically a problem.
    I would like to limit the variable to a single value only, in order to not confuse the users. Is this possible?
    Best regards,
    Christoffer Owe

    Hi,
    The following link tells you about the variable type ;
    http://help.sap.com/saphelp_nw70/helpdata/EN/ac/789b3c4d4d8d15e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/EN/22/1e9b3c334d8c15e10000000a114084/content.htm
    1. create variables with single values
    2.while creating variable tick the setting 'Restriction of values required by user'
    I think that will suffice your requirement .
    Thanks
    Pratyush

  • Fiscalyear/period single values loading

    Hi Experts,
    I have a problem in the query in which I have variable Fiscal year/period, when I try to load the varible value from selection and with single values for fiscal year period its getting stuck, I cancelled the varaible selection screen now i get message saying
    Microsoft excel is waiting for another application to complete an OLE action.
    Please advise what could be cause getting stuck when I try to load

    Go to RSD1, give the infoobject name (Fiscal year/period)  -> Business Explorer tab -> Query execution filter Val. selection: u201CValues in the infoprovideru201D

  • How to deal with single quote (') in a field value?

    I can successfully insert value with single quoet using
    Prepared statement with placeholder(?) construct .
    I can also successfuly use value with single quote(') in
    WHERE clause.
    My question is, is there a way to use string with single
    quote if a Statement like:
    String slqString ="INSERT INTO customers (name, address) VALUES ( 'O'Reilly Bob', 'St Mary's Street') ";
    Statement sqlStmt = con.createStatement();
    sqlStmt.executeUpdate(sqlString);
    The last statement will thow an SQLException because due to single quotes
    Any ideas?

    I think the question was regarding the ' in O'Reily. Use ' twice when using the Statement interface, i.e.
    ("O''Reilly Bob", "St Mary''s Street")
    So that's two single quotes, not a double quote, to successfully insert a single quote, if you know what I mean....
    But like you said PreparedStatement does things like this for you.

  • How can we Restict the Char single value Variables with , , =

    Hi Experts,
    How can we Restict the Char value Variables with <, >, <=  (without selecting Inverval or only passing single value)
    For Example
    We have a standard Query 0FIAR_C03_Q1005, in this
    New Selection
    "1 - 15 Days, Posting Date<=Key Date, Clearing Date>Key Date"
    This is restricted  with the
    Clearing(0CLEAR_DATE)
    <Clearing key date(0P_KEYD3)  It is a single value SAP Exit Varible
    PostingDate(0PSTNG_DATE)
      <= Posting keydate(0P_KEYD3)  It is a single value SAP Exit Varible
    When seeing these 0P_KEYD3, 0P_KEYD3 variables in the New selection screen they looks like  >0P_KEYD3, <=0PSTNG_DATE
    if you define any custom variables these are looks like =ZV_DATE.
    to enable < , >, <= symbols for variables what we need to do.
    In other way
    Say we created one variable ZV_DATE single value, processing type as customer exit.
    for this we populated current day,
    Now Requirement is we need to display the all the records which are <= current date,
    instead of passing low and high values, i want to restrict the calday <=ZV_DATE
    New selection
    0calday
      <=ZV_DATE
    How can we achive this, this is how the business content report having the restrictions
    Please sugget me.
    Thanks
    Chandra
    Edited by: Chandra Gandla on Jun 18, 2010 11:01 AM
    Edited by: Chandra Gandla on Jun 18, 2010 11:01 AM

    Ok,
    In the InfoObject 0calday in the query designer under the filter area, under characteristic restrictions right-click over that InfoObject (0calday).
    In the next window (select Values for [0CALDAY]  Calendar Day in the dropdown box for "Show" choose Value Ranges. Under the word "Between"  dropdown box select "Less than or equal to"
    Below that word click on the button of the dropdown box Select from list.
    In the new window select instead of History Variables and double-click on your variable ZV_DATE.
    Click on the right blue arrow to move it to the right.
    And there you go.
    Tip: It exists a SAP standard variable named 0DAT which is exactly the current date (don't need to use ZV_DATE variable).
    Diogo.

  • SQL to match a single value in a field with comma-delimited text

    I have a column that can contain none, one or many recordIDs
    (from another table) stored as comma-delimited text strings (i.e.,
    a list). I need to retrieve all records that match a single value
    within that list.
    For example, if I want to match all values that equal
    recordID 3, and I use ... WHERE MyColumn IN ('3') ... , I will get
    all records that have EXACTLY 3 as the value of MyColumn, but not
    any MyColumn records whose values include 3, if they are instances
    such as "3,17" or the like.
    Also using the LIKE operator -- as WHERE MyColumn LIKE '%3%'
    -- will get me unwanted records with values such as 35 or 13 ...
    Can I use some sort of intervening ColdFusion list processing
    to output only the desired records?

    Normalize your database so that your data becomes
    accessible.

  • In Report output, Missing Plan data with the Seletion option - Single Value input (more than 10 values)

    Hi ,
    I am running the Query (Actual Vs Plan) in the BEx Analyzer, with the input for the characteristic like Fiscal Year, Posting Period and Cost Center(20 Single value) it not comming up with the plan data - Actual data is coming up fine.
    If i gave 10 or less than 10 inputs ( single values input in the selection - option ) for the characteristic COST CENTER it coming up with all the data (Both plan and Actual).  if the COST CENTER input values more than 10, it not coming up plan data (Actual data is coming)
    Cost Center Variable is designed with an Authorization Variable.
    Can any one please help me to know why plan data is getting miss when the input limit more than 10 (single values input in the selection - option) in the Cost Center Variable? 
    An also could you please share that, What is the Max limit for the Single values and Range Value for an Selection - option in the BEx Variable.

    A)    Hi ,
                 In Report, I am having 2 variant.
    1.   For one variant, i have saved the input values for both the Select Single values & Select range for the cost center.
    8 Values in single & 4 Values in Ranges         
    It coming up with data successfully.
    2.    Another variant having input only for select single values for the COST CENTER, it contains 20 records (This variant also have restricted with the same values as above variant for COSTCENTER variable)
    Fiscal year                         : 2012
    Posting period                   : 8
    Cost Center                        : 20 values in Single                                             (Here I have separated the range values into single)
    It’s not coming up with plan data. 
    B)   If I gave only first 10 values in the Single value, Output for both actual and Plan are coming up…………. If I gave the Second 10 value in the Single value and got the Output for both actual and Plan.
    C)    I have also checked the following details of this query, 
    Executed the query in RSECADMIN and checked the Authorization log as below,
    Relevant Characteristics for Detailed Authorization Check  (Characteristics with Full Authorization Are Not Listed!)
      List of Effective Authorization-Relevant Characteristics for InfoProvider ZPCA_M36: 
    List Is Empty:
      There Are No Characteristics That Have to Be Checked in Detail 
              2.  Checked the Single value input by iteration, 1 to 10, it retrieves data.  More than 10 like 11, 12 … is getting failed to pull plan data.
              3. checked the selection Value range by iteration and I gave the range value count up to 25        inputs, its works fine.
    Thanks.
    Regards,
    Subashini.

  • 1.5.1: Bug with single keystroke bind value being displayed but ignored

    I just ran into a bug with using with bind values (run as statements) using SQL Developer 1.5.1.54.40, JDK 1.6.0_04, Win XP SP 2.
    If the bind value was previously Null (NULL checkbox checked), then typing one (and only one!) character into the Value field displays the character and deselects the NULL checkbox but is ignored when running the statement - the bind variable is treated as Null. Running the statement again redisplays the bind dialog and the NULL checkbox is deselected but there is no value in the Value field.
    For example: select rpad(dummy, :length, dummy) from dual;
    When running this as a statement and typing a value between 0 and 9 into the Value field results in null (ie select rpad(dummy, null, dummy) from dual). Running again and leaving the Null checkbox unchecked and typing the single character again produces the correct result (ie 9 produces 9 Xs). Running again and checking the Null checkbox and typing the single character again produces null again.
    This only occurs where you type a single key stroke in your bind value. If you type two characters and then delete one, the bind value is used correctly.
    theFurryOne

    Bug 7229257 - entering only one character in bind dialog value field is ignored
    logged.
    -Raghu

  • Variable multiple single value filled with customer exit used in FOX form.

    Hi guys, I definitly need your help in the following scenario:
    I have variable (multiple single value) filled in a customer exit and use it in web template. There it is used in the drop down box for selecting a special date in the analysis item. And there comes the first question:Why the results from the customer exit are written in the way "date1; date2; date3" in one line? They should appear line by line in rows. How can I influence that? I tried both data binding types, "variable" and "characteristic".
    Now a button raises a planning function with a fox formula which should write the selected date (from the drop down box) in a customer table using "call function".
    I always get the error, that I need to restrict the variable to "single value". Why do I have to do that and if necessary how can I do that? Other planning functions without the fox formula also work properly with using the selection from the drop down box.
    I appreciate you help.
    Kind regards, Anja.

    Hi Vamsi.,
    Try this code.
    WHEN 'PREVIOUS_YEAR_1'.
    IF I_STEP = 2. "after the popup of user entry
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZCURRENT_YEAR_PERIOD'.
    break-point.
    IF SY-SUBRC EQ 0.
    WA_YEAR = LOC_VAR_RANGE-LOW+0(4). "Year
    WA_MONTH = LOC_VAR_RANGE-LOW+5(3). "Period
    WA_YEAR = WA_YEAR - 1.
    CONCATENATE WA_YEAR wa_month INTO WA_FISC_PERD .
    CONCATENATE WA_YEAR WA_MONTH1 INTO L_S_RANGE-HIGH .
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDIF.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDIF.
    ENDIF.
    ENDLOOP.
    endif.
    Assing points if it helps you.
    -- Selva

  • Single value managed property with type Decimal

    Hi,
    Is there any way to configure queryable decimal managed property that is single value? RefinableDecimal00 etc. properties are all multivalue which doesn't seem to work in a search query as a filter (is there some way to make it work?).
    I'm trying to search for items with rating > 0 (AverageRating).

    Hi
    did u import util.date() in the component.
    did u write correct functionality in development for date.
    send test mail i will send one word doc related to this
    Regards
    Sunil
    [email protected]

  • How to compare single value with multiple values

    In my query I have something like this:
    A.SOR_CD=B.SOR_CODE where A and B are 2 different tables. This condition is in the where clause. The column in table A has single values but some values in table B have multiple comma separated values (822, 869, 811, ..).  I want to match this single
    value on the left side with each of the comma separated values. Please let me know how will I be able to do it. The number of comma separated values on the right side may vary.

    Hi MadRad123,
    According to your description, you want to compare single value with multiple values in your query. Right?
    In this scenario, the table B has comma separated values, however those comma separated values are concatenated into a string. So we can use charindex() function to return the index of the table A value. And use this index as condition in
    your where clause. See the sample below:
    CREATE TABLE #temp1(
    ID nvarchar(50),
    Name nvarchar(50))
    INSERT INTO #temp1 VALUES
    ('1','A'),
    ('2','A'),
    ('3','A'),
    ('4','A'),
    ('5','A')
    CREATE TABLE #temp2(
    ID nvarchar(50),
    Name nvarchar(50))
    INSERT INTO #temp2 VALUES
    ('1','a,A'),
    ('2','A,B'),
    ('3','c'),
    ('4','A,C'),
    ('5','d')
    select * from #temp1 a inner join #temp2 b on a.ID=b.ID
    where CHARINDEX(a.Name,b.Name)>0
    The result looks like below:
    Reference:
    CHARINDEX (Transact-SQL)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

Maybe you are looking for

  • Can 2 Macs share an iPhoto library?

    Hello. I currently work with iPhoto 6 on my iMac. I am about to buy a MacBook. Most of the time I will still use the iMac for my photos. However, sometimes I will want to do editing of photos on the MacBook. I want to keep the photo libraries on both

  • Is there a way to see free space on an iPod in iTunes 11?

    In iTunes 11 I can't find a way to see Remaining Space on a connected iPod. The graphical bar (which oddly only shows useful information when you mouse over it) shows space used, the Summary tab shows Capacity but nothing seems to show Free Space Rem

  • Writing time and voltage to a file

    I am using labview 7 Express with Windows XP. I have a PCI-MIO-16XE-10 DAQ card. I want my program to update 5 times a second. It is doing this with a while loop. However, I only want to write the date to a file once every 10 seconds. I want to write

  • Can we create a single bdc for raw materials , and for some other transacti

    hi can we create a single bdc for raw materials , and for some other transaction? how?

  • Swatch from square-pattern backrgound

    Hi Am hoping someone can help me. I have an image (JPG) that I want to create a pattern fill / swatch from. Here is the pattern: Now, I started creating little squares using the rectangle tool and tried to line them up next to each other and fill the