Set Region/Chart Width Dynamically

I am sure this has to be simple, but have been searching the forum for "Chart Width" and a LOT of data comes back. So, after searching for a long, time, I ask here... :-)
I would like to set the width of my charts dynamically from settings in the database. I know I can set the width and height in the chart settings section, but this hard codes them.
What I would like to do is get the width and height values from the user or a database query (so the user can customize how big a chart is) and set the values dynamically instead of hard coding.
Any suggestions or a shove in the right direction would be greatly appreciated.
Thanks!

Varad,
Thanks for the reply. This solved the problem of resizing the chart. What happened then was the the region was staying the same size, so the chart was running of the bottom and right if I increased the chart size. To fix this, I also had to update the region source to use the application items to pass in the width and height as well. Evidently the region was inheriting the width and height from the chart definition.
Anyway, go it working pretty much like I want it, although it does take some calculating.
On a side note, one irritating thing... When you turn on "User Custom XML" for the chart, it looses a bunch of stuff - like the Y axis information, grid-lines, etc. and you have to go put that back in manually.
Thanks again...

Similar Messages

  • Reports 9.0.2. How to dynamically set graphic/chart width in paper layout?

    Hi there,
    I have a graphic with vertical bars in paper layout. Its width ranges from quarter of a A4 page width to several ones spanned. I have made the page width large enough but can not control the graphic width dynamically and when too much data must be shown on the X axis the bars get too thick to read.
    Is there another way except of?:
    - making the graph middle-sized and hoping that the client will not notice the visual glitch when too much or less data is the case;
    - using JSP (this is not an option here).
    To make the things worse, when the graph is expanded beyond a A4 page width or something its border reflects the change, but its contents is ugly shrunk.
    As I browsed this forum, I got convinced that the only way to get the graph under control at some extend is to use JSP web report.
    Anyone with experience on this? 10x in advance folks.

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • Dynamically set flash chart height?

    Hi,
    I have a flash chart that includes a selector that alters the query for the chart. Depending on what the user selects, the chart shows a different number of rows (this happens to be a stacked horizontal bar chart, but this could apply to any chart type). I would like to be able to dynamically set the chart height based on the number of rows the query returns. If I set it too small and the user makes a choice that returns a larger number of rows, the chart bars are compressed to the point where the labels are unreadable or omitted altogether. Conversely, if I set the height to a larger value and the user makes a selection that results in a small number of rows, the chart is overly extended and hard to read.
    I am able to calculate what I'd like the chart height to be using a page item and a before header process. But I can't figure out how to pass this value to AnyChart. I tried using an item substitution (e.g., &P7_CHART_HEIGHT.) as the value for the chart height on the Chart Attributes/Chart Settings page, but this attribute requires a non-zero numeric value. I tried to figure out if I could alter the chart XML, but could not figure out how to do it and I'm not sure item substitutions would be passed in the XML anyway.
    Is there a way to dynamically set the height attribute of a chart at page load time?
    Thanks,
    Mike

    Hi Mike,
    You can update the Region Source of your chart, replacing the substitution strings *#HEIGHT#* with the reference to your page item *&P7_CHART_HEIGHT.*. So your chart region source should then look something like the following(note that I've trimmed some lines for display purposes), and when the chart is run it will pick up your setting for the height, based upon the value returned from your Before Header process:
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
        codebase="#HOST_PROTOCOL#://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
        width="#WIDTH#"
        height="&P7_CHART_HEIGHT."
        id="#CHART_NAME#"
        align="top">
    <param name="movie" value="#IMAGE_PREFIX#flashchart/anychart_5/swf/...............................">
    <param name="quality" value="high">
    <param name="allowScriptAccess" value="sameDomain">
    <param name="allowNetworking" value="all">
    <param name="scale" value="noscale">
    <param name="wmode" value="transparent">
    <param name="FlashVars" value="initText=#FLASH_INIT#&xmlLoadingText=............................................">
    <embed src="#IMAGE_PREFIX#flashchart/anychart_5/.......................................
           quality="high"
           width="#WIDTH#"
           height="&P7_CHART_HEIGHT."
           name="#CHART_NAME#"
           scale="noscale"
           align=""
           allowScriptAccess="sameDomain"
           allowNetworking="all"
           type="application/x-shockwave-flash"
           pluginspage="#HOST_PROTOCOL#://www.macromedia.com/go/getflashplayer"
           wmode="transparent"
           FlashVars="initText=#FLASH_INIT#&xmlLoadingText=#FLASH_................................................">
    </embed>
    </object>
    #CHART_REFRESH#
    {code}
    I hope this helps.
    Regards,
    Hilary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Setting Portlet Header Widths (not region widths!)

    Am having trouble with portlet headers / portlets' widths being determined by the text width.
    My region widths are set yet I have noticed that when I show portlet headers the width of the portlet appears to be determined by how many text characters in the header- (not how many text characters in the portlet itself)
    Is there some way I can set the portlet width (as opposed to the region width) to ensure uniformity across my site?
    Any help appreciated!
    Thanks
    Jo

    The user you have responded to is totally unaware of your post as watches on threads only persist for a few weeks. Do not post follow-ups to ancient threads. Many of the participants in such threads will no longer be active on the forum (check the "recent messages" in their profiles).
    Posting follow-ups to ancient threads/departed users is NOT an effective way of getting help:
    <li>Other users may ignore the thread if it is closed
    <li>Your assumption that the questions are related may be incorrect, leading to confusion about the nature of the problem and potential solutions
    <li>Watches on the thread may have expired, so the original participants may be unaware of the new post, or they may no longer be active on the forum
    <li>You have no ability to mark posts as helpful or correct
    Post your question as a new thread, including at least the following information:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s)
    <li>Links to related posts and threads (using the methods in the FAQ)
    Please read the FAQ and forum sticky threads for more information on using this forum effectively.
    Update your forum with a real handle instead of "user11986803".

  • Dynamically set itemRenderer content width

    Hey all,
    thanks for taking time to look at this. what I'm trying to do
    is simple, I think, but evading me. I've got a datagrid set to 100%
    width. I've got a total of 7 columns, the first 2 are fixed width.
    The remaining 5 columns (and their contents, importantly), should
    dynamically size to take up the remaining area. I'm using
    comboboxes within these columns, and can't seem to set the width of
    these comboboxes based on the width of the column they appear
    within. I've tried just setting them to 100%, but that causes a
    scrolltrack to appear and the combobox is hidden behind the
    scrolltrack.
    help is greatly appreciated

    Are you using a drop in, inline, or custom component for an
    itemRenderer? I do not think you can do this with a drop in item
    renderer. I think you can do it using an inline itemRenderer but
    this is not an ideal solution. I think that if you use a custom
    component as the item renderer you could use databinding on the
    width of the combo box where the data grid column of the data used
    is the source.
    ie. comboBox width="{columnx.width}" where columnx
    corresponds to the column housing the combobox.

  • Flash Chart Width

    Hello,
    I would like to dynamically set the width of a flash chart, as the number of columns I display may vary a lot.
    Is there a way to do that ?
    Actually, I set a fixed width in the chart attributes, and I imagine that it is used in the #WIDTH# tag in the region source.
    Christophe

    I have the same problem with flash chart. In fact, no matter what I set for the chart width, it always displays up to 15 bars. 15 must be a default but I don't know where I can change it.
    In SVG chart, I can change the data point limit (default is also 15) to something larger. How can I do that in flash chart? Ideally, the chart should automatically scale the bar width based on the number of data points.

  • How to Set Anychart Bar Width?

    I have searched for this, perhaps I am missing something obvious ...
    How do I set the Anychart bar chart width?
    When a chart has only a few values, the bars are too wide.
    Client want standard (narrower) bar widths in these cases, not one or two wide bars.
    Have searched the XML settings, have not found it yet.
    Anyone?
    Thank you - Karen

    Hi Karen,
    With AnyChart, the bar width is something that is calculated automatically.  You'll see this mentioned in the AnyChart online documentation on Bar Charts.  You could try playing around with the padding options, to see if such settings help.
    Regards,
    Hilary

  • Setting Region Attributes

    Trying to set some region attributes to control width and height of my region. Unfortunately the settings do not seem to work.
    I have entered width=700px, width:700px, "width=700px" and "width=700px", all with no luck.
    If I edit the region template directly and replace the #REGION_ATTRIBUTES# tag from the top level div with style=width:700px, all works well.
    What am I doing wrong when setting Region Attributes?
    TIA...
    Edited by: dragnet on Feb 13, 2011 12:17 PM
    Edited by: dragnet on Feb 13, 2011 12:17 PM
    Edited by: dragnet on Feb 13, 2011 12:17 PM
    Edited by: dragnet on Feb 13, 2011 12:17 PM

    Think I got it. Found that the full entry style = "width:700px" seems to do it....

  • Setting different pages widths in different sections - Pages 5.2

    In Pages 5.2, how does one set different page widths (margins) in different sections?

    You can't. Margins apply to the entire document.
    What you can do is set the margins to their max width and then use left and right indents for the sections you want narrower.
    Peter

  • Is there any way to set default column widths in the Finder's Column view

    When my Finder windows open in column view, all the columns are always VERY wide. I have to then spend time resizing them to a managable width. Is there any way to set default column widths in the Finder's Column view?
    <Re-Titled By Host>

    No, because you can't set a columns view default.
    27" i7 iMac (Mid 2011) refurb, OS X Yo (10.10), Mavs, ML & SL, G4 450 MP w/10.5 & 9.2.2

  • OLE2 how to set a column width of an excel file i'm creating?

    how can i set the column width in an excel file i'm creating with ole?
    or even, haw can i set the auto-fix properties?

    Hallo !
    SORRY MY ENGLISH is very BAD.
    I tried to set page header and  footer in Excel sheet with abap ole
    DATA : BEGIN OF enter,
             x(1) TYPE x VALUE '0D',
            END OF enter.
    DATA : format(255) TYPE c.
    FORM set_page_sheet.
      CALL METHOD OF excel 'ActiveSheet' = sheet.
      CALL METHOD OF sheet 'PageSetup' = pagesetup.
      SET PROPERTY OF pagesetup 'Orientation' = xllandscape.
      SET PROPERTY OF pagesetup 'PrintTitleRows' = '$9:$12'.
      CLEAR format.
    ERROR
      CONCATENATE 'PAGESHEET' enter-x 'PAGE &P/&N' INTO format.
    ERROR
      SET PROPERTY OF pagesetup 'RightHeader' = format.
      CLEAR format.
      CONCATENATE ' Text 1 ' enter-x 'Text 2'
    enter-x 'Text 3 ' INTO format.
      SET PROPERTY OF pagesetup 'RightFooter' = format.
      FREE OBJECT pagesetup.
    ENDFORM.                    " set_page_sheet
    Activate report -
    ERROR - The enter-x must by data type c or another then data type x
    Thanks for answer.

  • GET SET function in a dynamic Class?

    Is it possible to add a GET SET function in a dynamic class, like we can add properties to a dynamic class?

    correction :
    MyObjectProxy extends ObjectProxy{
         override callProperty(
              // your dyna logic
    and expose new MyObjectProxy(dynaInstance)

  • How to set displayed column width for a search help

    I have created an elementary search help for a custom field with a value table behind it.
    The search help functions correctly, but when displayed the column widths are all 10 characters. The user has to adjust the column to view the descriptive text.
    Can anyone tell me how to set default column widths for the help?

    Please  open you Elementary search  help  and see the Column  width   behind the Fields of your ...there  increase the width of the fields
    "Activate it  and refresh
    reward  points if it is usefull .....
    Girish

  • How to set the column width in the PDF exports of interactive reports ?

    Hello,
    I have a huge problem with the PDF export for the Interactive reports. I'm using APEX 3.2.
    I have to produce a PDF report in landscape format that show 21 columns. My problem is that the columns have a ridiculous short width and that the text inside the columns do not wrap in the columns. So I get things like that :
    Date Name
    2011 Leina
    I should see 2011-08-01 and the name Leinad Jan
    I tried several things to format the columns, but none of the them has any effect on the PDF itself.
    1) I used HTML code in the report query. It works well with the interactive report, but display the HTML tags in the PDF.
    2) I used css to set the width of my columns. It works in the interactive report, but not in the PDF, the column width do not change.
    It's like the report do not notice that my page format is Legal 14 x 8.5 (Landscape) and still believe it's 8.5 x 11 (which is "portrait")
    Do you have any idea so set the columkn widths in the reports ?
    Thank you !
    Edited by: leinadjan on Aug 1, 2011 11:15 AM

    To "remember" the column widths, add a mouse listener to the table header. Upon mouseReleased(), get the column widths and save them to your file. When the application starts next time, get the stored widths and set them using:
    table.getColumn("XXX").setPreferredWidth(...);
    By default, your columns are adjustable, but you can use:
    table.getTableHeader().setResizingAllowed(true);

  • How to set a specific width to all the TextInputs used in a mxml file on its creation complete?

    How to set a specific width to all the TextInputs used in a mxml file on its creation complete?

    Hi subhajit nag,
    I think the best approach would what I say is if you can make use of a Global variable or using a Singleton class having a variable which can be accessed globally through out the application.
    Below is the sample what I am talking to:
    So in below example you can access the variables textInputWidth and textInputHeight globally throghout the application since you have decalred them in main mxml file.
    You can access these variabled in another mxml file as Application.application.textInputWidth and Application.application.textInputHeight. So if at all you are required to modify these values you are only required to modify at a single place in main mxml file..thats it.
    If you are use any Singleton classes like ModelLocator you can place these variables in this class and refer from that class.
    Hope this resoved your problem..
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
    <mx:Script>
      <![CDATA[
       [Bindable]private var textInputWidth:int = 250;
       [Bindable]private var textInputHeight:int = 25;
      ]]>
    </mx:Script>
    <mx:Canvas id="canvas1">
      <mx:TextInput id="txt1" width="{textInputWidth}" height="{textInputHeight}"/> 
    </mx:Canvas>
    <mx:Canvas id="canvas2">
      <mx:TextInput id="txt2" width="{textInputWidth}" height="{textInputHeight}"/> 
    </mx:Canvas>
    <mx:Canvas id="canvas3">
      <mx:TextInput id="txt3" width="{textInputWidth}" height="{textInputHeight}"/> 
    </mx:Canvas>
    <mx:TextInput id="txt4" width="{textInputWidth}" height="{textInputHeight}"/>
    <mx:TextInput id="txt5" width="{textInputWidth}" height="{textInputHeight}"/>
    </mx:Application>
    If this post answers your question or helps, please kindly mark it as such.
    Thanks,
    Bhasker Chari 

Maybe you are looking for

  • I need to install cc on two macs. My Macbook Pro and my Imac. Can I use the same account?

    I have two machines I use. One primarily for photography on the move and another for mostly Indesign work. Question is can I use the same account on both as it will never be simultaneous. Derek

  • Finance GL/ AR /AP extraction

    Hello Experts, I am a newb with respect to BI/BW extraction. Please read through and let me know if all the configuration is proper and is there any change required. I donot have access to SAP notes. I have referred to best practices, but for the GL

  • Non working equalizer in Itunes 7

    We installed itunes 7 on my wifes G4 laptop but when she tries to open the equalizer it does not appear. When she hides the main itunes window an empty equalizer window will appear about 1/2 the time. The other half of the time it remains hidden. The

  • Links in Stickies

    Is there a way to create a "clickable" link in Stickies? Specifically, I want to cut-n-paste a group of links from Goggle maps for my daily trip routing into a sticky note. I don't want to create a Google account and then have to log-in, etc. each ti

  • I am trying to make a subclip but it makes a new sequence

    When I mark in and out points and click on "make subclip", it instead makes a new sequence.  Any ideas?