maglub

Members
  • Content count

    1
  • Joined

  • Last visited

About maglub

  • Rank
    Forum Newbie
  1. x-axis scale

    Hi, I assume you mean that you want daily data to be plotted, but only show the legend on the x-axis for certain values, like 1st of Jan, 1st of Feb. I wanted only 15 values to be shown, but had between 30 - 720 values to be plotted, and solved it like this in PHP: $strXML .= ""; // show only ca 15 dates on the calendar. $show_frequency = $num_days / 15; // create the calendar (catigories) $cur_row = 0; foreach ( $cur_calendar as $cur_day ) { if ($cur_row++%$show_frequency == 0 ) { $cur_display = 1; } else { $cur_display = 0; } $strXML .= ""; $cur_row++; } $strXML .= ""; This produces XML that looks like this: categories category name='2008-03-29' showName='1' / category name='2008-03-30' showName='0' / category name='2008-03-31' showName='0' / category name='2008-04-01' showName='0' / category name='2008-04-02' showName='0' / category name='2008-04-03' showName='0' / category name='2008-04-04' showName='1' / category name='2008-04-05' showName='0' / category name='2008-04-06' showName='0' / ... Sorry for the weird xml, but the forum does not display the code within "<" and ">", weird. This means that you've got a category for each and every "bucket"/date, but only the ones with showName=1 will be visible in your chart. Good luck! //magnus