0

I need to figure out how to do two custom axises with flot charts.

For the Y-Axis it must only show rounded numbers such as 100, 200, 400, 1000, 2000, 4000, 6000 So the first digit can be either a 1, or a multiple of 2. It can be 300, 500, 700 etc

the X-Axis must be broken down to exactly Week1, Week2, Week3, Week4, and Week5 for a month. (It's fixed that even if there isnt enough days to fill it doesn't need to stretch to the end. It's to show the break down of one month.)

Greg Benner
  • 668
  • 7
  • 15
  • Figured out the first part: http://jsbin.com/wawetoto/1/
       var num = [1, 2, 5, 6, 10, 20, 30];
       function evenSteven(element){
         firstDigit = parseInt(element.toString().substring(0,1), 10);
      
         if (firstDigit % 2 === 0 || firstDigit === 1) {
           return element;
         }
        }
    var filteredNum = num.filter(evenSteven);
    console.log(filteredNum);
    
    – Greg Benner Apr 07 '14 at 09:55
  • Have a look at this [link](http://stackoverflow.com/questions/5820954/flot-with-string-x-axis) – Blake Apr 07 '14 at 18:01

0 Answers0