Width of the bars in a XYBarChart

Hello, I have a XYBarChart but it has severals values, and the bars are superposed because they are a little wide. I want to know if there is some method to modify the width of the bars. The code I have is:
public JFreeChart BarsChart(String vInDep, String vDep){
   final XYSeries series = new XYSeries();     
   /* I load the chart */
        for (int i=0; i<arrayVars.length; i++){
      float x= Float.parseFloat(arrayVars[0]);
float y= Float.parseFloat(arrayVars[i][1]);
series.add(x,y);
final XYSeriesCollection ColeccionDatos = new XYSeriesCollection(series);
final JFreeChart chart = ChartFactory.createXYBarChart(
"Chart Barras "+vDep+" vs "+vInDep, //Tittle
vInDep, //Legend X Axis
false,
vDep, //Legend Y Axis
ColeccionDatos, //Dataset
PlotOrientation.HORIZONTAL, //Orientation
true, //Flag legend
true, //Flag tooltip
false //Flag URLs
/* I invest the Domain to create the "graph in depth" */
XYPlot plot = (XYPlot) chart.getPlot();
NumberAxis rangeAxis = (NumberAxis) plot.getDomainAxis();
rangeAxis.setInverted(true);
return chart;
Thanks very much

I have already solved this, I had to do this after ...
   final JFreeChart chart = ChartFactory.createXYBarChart(
      "Chart Barras "+vDep+" vs "+vInDep,   //Tittle
      vInDep,                  //Legend X Axis
               false,
               vDep,                  //Legend Y Axis
               ColeccionDatos,            //Dataset
               PlotOrientation.HORIZONTAL,   //Orientation
               true,               //Flag legend
               true,               //Flag tooltip
      false               //Flag URLs
   /*   I invest the Domain to create the "graph in depth"    */
   XYPlot plot = (XYPlot) chart.getPlot();
   NumberAxis rangeAxis = (NumberAxis) plot.getDomainAxis();
   rangeAxis.setInverted(true);
   /*   ****************************************   */ I have post:
final XYBarRenderer renderer = (XYBarRenderer) plot.getRenderer();
renderer.setMargin(0.95);
   return chart;   And It goes!!

Similar Messages

  • How to change the width of the bar of bar charts?

    Hi,
    I am using Crystal Reports 11.
    I created some stacked bar charts. Now, I want to change the width of the bar. Some one told me that I can't do that because it's totally controlled internally by Crystal Reports.
    Really?
    If could, how could I do?
    Thank you in advance.

    Hi,
    The only way you can set the width of the bar is by going to Chart Options (Right-click Chart in Preview Mode > Chart Options > Appearance tab > Decrease the Gap Width).
    Hope this helps!
    -Abhilash

  • Decrease the width of the bars in the chart

    Hello,
    Can anyone please tell me how can I decrease the width of the bars in the flash chart type 3D column.
    Thanks,
    Orton

    Hi Deyang,
    You have to create your own layout:
    - Navigate to System Administration->Support
    - Choose Portal Runtime -> Browse Deployment
    - Navigate under pcd or under temp, and download the layouts par (com.sap.portal.layouts.default.par.bak if I recall correctly)
    - Import that par as a project to Developer Studio
    - Make your changes (create a new jsp acording to the existing examples, and update the portalapp.xml accordingly)
    - Export to par (in a different name!) and deploy
    - In the portal content: new from par -> Layout (don't forget to mark it as a template).
    - Your new layout template will now be available when you create new pages.
    good luck!

  • I do not want the "unsubscribe" option tab at the top of the feed bar; it interferes with the width of the bar and i have to expand it each time to close the tab for the "feed not found" notice..

    this new rssfed update created an "unsubscribe" tab at the top of the feedbar. i don't want it there. i perfectly capable of unsubscribing by clicking the link. now the tab has to extended each time i want to close the notice of "feed not found"
    == This happened ==
    Just once or twice
    == firefox updated the rss feed this week

    Check if you are running Firefox in Full Screen mode
    * click '''Firefox''' button and unselect '''Full Screen'''
    * or press '''F11''' to toggle Off Full Screen mode
    Check and tell if its working.

  • How to change the width of the sheet number place holders along the bar in 3.5.2

    I wish to increase the number of sheet names shown along the bar by reducing their width to minimise having to scroll left or right , can anyone help

    Hi John,
    No can do.
    You can send feedback to Apple asking for this enhancement. In Numbers, Menu > Numbers > Provide Numbers Feedback.
    SGIII has posted a method to jump to a sheet using AppleScript on Automator
    Re: linking sheets
    Regards, Ian

  • How to change the width of scroll bar

    hi,
    is there some way to increase the width of the scroll bar or is it operationg system dependent?
    thanx and regards
    deepak saini

    hi
    not sure if this is the best way to do it, but it does work...
    try this...
    int newWidth = 50; //for example - this is big!!
    int h = (int)myScrollBar.getSize().getHeight();
    myScrollBar.setPreferredSize(new Dimension(newWidth, h));
    the above depends on whether your scrollbar is horizontal or vertical also. if you're using JScrollPane, call getVerticalScrollBar() to retrieve the bar (or horizontal as required).
    hope this helps
    Takis

  • How can i fix the tab overlapping when i change the width of the url bar with #urlbar-container [focused]?

    I want to create for myself the most minimalistic browser experience as possible and i've put the most used features in the title bar. For purposes of space i had to fix the width of the url bar to a minimum and my intention is to increase it to a fixed width only when #urlbar-container [focused]. The problem is that #urlbar-container will overlap the existing tabs instead of shrinking their space, making it look really bad. It looks wonderful with #urlbar-container:hover, but i can't use that since whenever i want to refresh the wesbite using the button the width of the container will increase moving the button from the place i had the mouse in the first place to click it.
    Fixed width of the url bar when #urlbar-container is not focused:
    http://imagizer.imageshack.us/v2/800x600q90/829/xo4o.png
    Fixed width of the url bar when #urlbar-container [focused]:
    http://imagizer.imageshack.us/v2/800x600q90/34/8o36.png
    This is the css i have for the url bar at the moment:
    <pre><nowiki>#urlbar-container {max-width:225px!important;}
    #urlbar-container {min-width:225px!important;}
    #urlbar-container {transition:0.7s!important;}
    #urlbar-container [focused] {max-width:500px!important;}
    #urlbar-container [focused] {min-width:500px!important;}
    #urlbar-container {transition:0.7s!important;}
    #urlbar {border-top-right-radius:10px!important}
    #urlbar {border-bottom-right-radius:10px!important}</nowiki></pre>

    What method (code) did you use to get the Tab bar displaying in the space used for the Navigation Toolbar (location bar)?
    The Tab bar should be displayed above the Navigation Toolbar.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How do I make a horizontal bar stretch to always fill the width of the browser outside of the wrappe

    When I enter 100% in the width field it will fill to the wrapper which is at 1000px, I want just certain Horizontal Bars to fill the width of the browser at all times.
    Example is at http://www.hollywoodunderground.com - the bars below the header/links and the bar above the footer. Trying to figure out how to get both of those to always fill the width of the browser while still maintaining the original wrapper for all of the other content. Do I just find a way to get those 2 bars outside of the wrapper into a new wrapper or do I do it within the wrapper?

    You would have to set up your construction a bit differently.
    You would put the logo and the social media icons in their own  <div> set to 1000px, margin 0 auto to horizontally center it
    <div id="logoSocialMedia"></div>
    Then you would have your black bar <div> set to width: 100% (no need to set this though as it will fill the available space).
    <div class="blackBar"></div>
    Then you would have your youtube videos <div> set to 1000px, margin 0 auto.
    <div id="youTubeVideos"></div>
    Then another black bar <div>:
    <div class="blackBar"></div>
    Get it?

  • How to fix the width of each bar in the Bar chart.

    Hi,
    In BO design studio 1.3 is there any way to make each bar in the bar chart with fixed width.
    Thank You,
    Palani.

    Hi,
    if you are using a grid layout the witdht of the bars is not really fixed.
    When you adjust the screen size, the charts and the bars in each chart rezise according to the size of your screen.
    But that is one of the advantages using grids.
    Otherwise the size of the chart and the bars is fixed but as far as I know there is no option to manually adjust the size/width of each bar.
    Regards,
    Steffen

  • How can I enlarge only the width of the submenus in my spry horizontal menu bar?

    The text in my submenus is hanging off the menu itself, but I
    can't change the size of the parent menus. The submenus can be
    wider than the parent menus, that's fine. That's what I what,
    actually.
    I've tried for two days now to figure this out and I'm really
    stuck and would appreciate any input.
    Thank you!

    "lighteyedbaby" <[email protected]> wrote in
    message
    news:go4kuq$a6a$[email protected]..
    > The text in my submenus is hanging off the menu itself,
    but I can't
    > change the
    > size of the parent menus.
    Please stop posting the same question in multiple threads. It
    wastes
    everyone's time, including your own. I have told you in
    another thread
    which selectors control the width of the submenus.
    David Powers
    Adobe Community Expert, Dreamweaver
    http://foundationphp.com

  • Increasing the width of scroll bar

    Hi,
    I have a table which is added to a JScrollPane and a JScrollBar is added.
    How do I increase the width of the JScrollBar?
    I have tried b.setSize..... and no luck :(
            //Create the scroll pane and add the table to it.
            JScrollPane scrollPane = new JScrollPane(table);
            scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
            JScrollBar b = new JScrollBar();
            scrollPane.setVerticalScrollBar(b);
            //Add the scroll pane to this panel.
            add(scrollPane);cheers
    bobby

    Looks like my day of posting "don'ts" <g>
    OnlyForJava wrote:
    Hi bsbiran ,
    use setPreferredSize on JScrollBar
    Beware that setting any of the setXXSize (with XX = min/max/pref) completely by-passes any size-calculation normally done by the component and/or its ui-delegate. So that's definitely not recommended. Even if it works now it sure will come back to and bite you later.
    @OP: the basic question is: Why do you want to do it? Typically, a component's pref sizing is determined internally based on some state. If you want to augment that internally calculated size, the correct way is to subclass the component, override the getXXSize and add any custom calculation.
    Cheers
    Jeanette

  • Allow the user to control the width of the edit forum post input box

    I would like to control the width of of the edit-forum post input box.  This could be:
    automatically adjust the width of the box so that the box doesn't run off the right edge of the window.
    have a user global preference to set the preferred width
    at least, allow the user to change the width via the change size icon.  The three horizontal bars at the lower left of the input box. You can adjust the vertical dimension, but not the horizontal. TenFourFox 4.0.1. This is probably being blocked for some obscure reason.
    Here is an example of an over extended right margin:
    Curiously enough, the "software" let's me adjust the width & height of the add reason to edit text, but not adjust the width of the more important edit text box.
    Robert

    Testing
    Standard Reply box can be height adjusted but not width.
    Same with Advanced Editor
    No Adjustment at all in HTL Editor
    Edit.
    The Edit uses the Advanced Editor
    Only Height Adjustment again.
    I do seem to remember someone posting about the width and saying they could drag it over the edge of the right hand edge (Into the grey surround)
    This may have been a post in the lounge.
    It didn't actually try it at the time but have played with it since and have not seen it.
    Maybe it is something they "Fixed" in both senses of the word.
    Second edit.
    I can't alter the box that currently reads "Message Edited by:- ..."
    I also can't get this box to accept New lines  (they appear in the box but don't post that way)
    Corrected Spelling
    9:51 PM      Wednesday; May 11, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.7)
     Mac OS X (10.6.7),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously
    Message was edited by: Ralph Johns (UK)
    Message was edited by: Ralph Johns (UK)
    and new line with a line space as well

  • I can no longer adjust the width of the Bookmarks Sidebar, how do I fix this issue?

    In the past I could hover my mouse arrow over the slider vertical bar to the right of the sidebar and get a 2 headed arrow that I could use to adjust the width of the Bookmarks Sidebar but that stopped working. I need to fix this issue. What do I need to do?

    Maybe something you installed to Firefox messed up that feature.
    Do you have that problem when running in the Firefox SafeMode? <br />
    [http://support.mozilla.com/en-US/kb/Safe+Mode] <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    If not, see this: <br />
    [http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes]

  • How do I change the width of the x-scrollbar for a waveform graph?

    I have a LV7.1 application that contains a waveform graph and must be usable on several PC with widely varying screen resolutions.  I have decided to position and scale the front panel objects programatically, including the graph itself.  The appearance of the graph is satisfactory on all screens, except for the x-scrollbar.  The width of the x-scrollbar does not change when I change the size of the graph.  I cannot figure out how to change the width of the scrollbar programatically to match the adjusted size of the graph.  Any suggestions?
    Regards,
    Chris

    Chris,
    I don't think that you can change the width of the x axis scroll bar programatically.  One thing you could do though is create your own scrollbar and change it's properties as your program runs.  I wrote a quick example of how you could do this and I've attached it to this thread.
    I hope this helps,
    Justin D.
    Applications Engineer
    National Instruments
    Attachments:
    ChangeXScrollbar.vi ‏116 KB

  • Reduce width of the entire portal page

    Hi All
    I'm trying to modify the width of the entire portal page (this includes masthead, TLN, content area) from 100% to 75%. I change the width property in the used css class, but the changes are not reflected.
    If I have to change the width in the jsp page, which par file should I change? I checked the light_franework.jsp in com.sap.portal.layouts.frameworktest.par, but it does not have any html tags at all. Im looking for a table which uses prtlHeaderCon as the css class.
    WIll be thankful for any help.
    Thanks
    J

    I am also facing same issue with my portal. I need to change the width to 99% from 100% in order to get rid of an extra scroll bar. So can you please tell me what html code you implemented in light_framework.jsp to alter the width of the table.
    Thanks,
    Harish.K.

Maybe you are looking for

  • HT5312 How to reset my security questions for my Invoice2go

    How to reset my security questions for my Invoice 2go

  • WRT600N USB Storage Problems Solved

    For a couple of years, I've been living with all the problems others have reported with the WRT600N USB storage - lost connections, permissions problems, rebooting the router to recover access to the USB drive, etc. I solved my problems, mostly, by s

  • How to expdp table with a BLOB field when table is larger than UNDO tbs?

    We have a 4-node RAC instance and are at 11.1. We have a 100 gig schema with a few hundred tables. One table contains about 80 gig of data. the table has pictures in it (BLOB column). Our 4 node RAC has 4 12 gig undo tablespaces. We run out of undo w

  • ADF Essential and JDeveloper

    Hi, If I want to use ADF essential module, should it deploy in JDeveloper 11.1.2.3 module installation? Or when I install JDeveloper 11.1.2.3, is ADF essential module automatically installed? Thanks

  • Kernel patch

    Hi team, Here iam applying Support package SAPKB70014. I have applied the support packages from SAPKB70007 to sapkb70011. but when iam applyin the support package SAPKB70014, it gives me an information saying that " SAPKB70014 REQUIRES KERNEL RELEASE