Sunday, June 22, 2008

Specify the same width of a column chart in APEX

During my presentation of "Advanced Charting in APEX" during ODTUG I got a question how to specify always the same width of a column chart in APEX.

I had a look into this, but couldn't find an easy way to do it in Anychart 3 (the current version in APEX).

If you look at the Anychart 3 documentation then you'll find this section:


There's not really a width you can specify for every bar. Like I said during the presentation, it would be extremely difficult to do that for Anychart, as it doesn't know how many data it will need to show. The only option I see at the moment is to dynamically set the column_space and block_space, depending on the number of values you have. Like I gave in my example the dynamic scaling (maximum of the chart); you create an hidden item and give it a value. You use the hidden item in your Custom XML to define the left_space, right_space, column_space and block_space.

If somebody else already did it another way, feel free to add a comment.

3 comments:

  1. That's one easy thing when using fusioncharts. we've integrated fusioncharts in our better.crm apex based solution. we have dynamic in app dashboard creation.. and one of the features that fusioncharts provides is to have scrollable charts, that don't mess up the bar size. I've also tried to do what you ask about in anycharts3 and i did not been able to do it! :(

    Regards,
    Joao Oliveira

    ReplyDelete
  2. Hey guys,Take a look on this an amazing charting componentvisifire Draw charts and play with there animation offered under open source powered by silverlight just for free

    ReplyDelete
  3. Dimitry, how do you scale an APEX application to handle millions of users. Say, you build a on-line shopping site with APEX. Traffic is around 10 million page visits per day.

    How would you scale the app???

    The way I understand APEX is that it runs inside the DB. So, that is like the "APEX server".

    Your data is in another DB.i.e. the DB server. The APEX application will write to THIS DB only.

    APEX don't need a special app server to run, right???

    So, where do we do the load balancing to scale to 10 million page visits per day?

    10 million page views per day, comes to about 100 views per second.

    So, is your solution to replicate 100 "APEX servers", all pointing to the one "DB server" and thus load balance the requests?

    What is going to do the load balancing of the requests?? Will need a HTTP server like APACHE to distribute the requests to the 100 "APEX Servers"??

    ReplyDelete