SAI Posted November 13, 2008 Report Share Posted November 13, 2008 Hi, I have 8 series bar graph generated using chartfx. I always use first or second 4 series to be plotted on graph with different colors. That was my requirement. The issue I am running into is all the bars shown on the graph are so thin. They are harder to see when I generate with large amount of data. I am using Chart.HIDDEN for the series which I do not want to show. How can I increase the width of the bars? I tried setVolume but seems to be not working properly. Is there any way I can opt to not to show hidden series on the graph? Thanks in advance, Quote Link to comment Share on other sites More sharing options...
TomasT Posted November 13, 2008 Report Share Posted November 13, 2008 Hi, The only way to manipulate the width of the bars is by using the setVolume nethod. Please ntoe however that the Volume refers to the percentage of the allocated area that each bar will use. In other words, when the chart is calculated, chartfx assigns a real estate for each bar along the X axis. Let's say for example that the X axis has 300 pixels and that you have one series with 6 points. ChartFX will divide the available space (300ox) by the number of bars (6) which will result in 50px for each bar. Then, when you use the Volume property, you are basically telling the bar to use a percentage of those 50 pixels. The maximum value you can pass to the setVolume method is 100%. Now, if you want to hide a particular series all you need to do is set its visibility to false: chart1.getSeries(2).setVisible(false); Hope this helps. Regards, TT Quote Link to comment Share on other sites More sharing options...
SAI Posted November 13, 2008 Author Report Share Posted November 13, 2008 Thanks Tomas. I appreciate your response. Is there any way we can check particular series for null and make 'chart1.getSeries(thatSeries).setVisible(false)' on that series? Thanks in advance, Quote Link to comment Share on other sites More sharing options...
TomasT Posted November 14, 2008 Report Share Posted November 14, 2008 Hi, How are you passing data to the chart? What do you consider to be a Null series? Is it columns where all the values are null? Or is it a column with no records at all? I believe the best bet would actually be to identify those series before they are passed to the chart and either filter them or indetify them a null. Regards, Tomas Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.