dz's Open Flash Chart 2 patch bug

650 views Asked by At

i am using the patched version(http://ofc2dz.com) because i need the functionality of "null-gap":true. i have a line graph which works fine, with null values and without. when i change one y value to null, the graph displays with a blue panel across the top. the good news is, i have the json which works, and the json with the small change which breaks the graph. i am hoping an open flash chart guru will spot the error i have made. i have pasted the json below.

thanks for any help

THIS JSON WORKS:

{
  "bg_colour": "#F4F4F4",
  "title": {
    "text": "title",
    "style": "{font-size:20px; color:#F90F0E; font-family: Verdana; text-align: center;}"
  },
  "y_legend": {
    "text": "Values",
    "style": "{color:#F90F0E; font-size: 12px}"
  },
  "x_legend": {
    "text": "Date",
    "style": "{color:#F90F0E; font-size: 12px}"
  },
  "elements": [
    {
      "type": "line",
      "colour": "#0000FF",
      "width": 2,
      "text": "test",
   "on-show":{"type":""},
      "values": [
        {
          "x": 1291161976,
          "y": 42
        },
        {
          "x": 1291283358,
          "y": 10
        },
        {
          "x": 1291334716,
          "y": null,
    "tip": ""
        },
        {
          "x": 1291421116,
          "y": null,
    "tip": ""
        },
        {
          "x": 1291507516,
          "y": null,
    "tip": ""
        },
        {
          "x": 1291593910,
          "y": 19
        },
        {
          "x": 1291680310,
          "y": 19
        },
        {
          "x": 1291766710,
          "y": 19
        },
        {
          "x": 1291853117,
          "y": 15
        },
        {
          "x": 1291900196,
          "y": 16
        },
        {
          "x": 1291902293,
          "y": 17
        },
        {
          "x": 1291946711,
          "y": 16
        },
        {
          "x": 1292033116,
          "y": 15
        },
        {
          "x": 1292119510,
          "y": 17
        },
        {
          "x": 1292205917,
          "y": 15
        },
        {
          "x": 1292292315,
          "y": 17
        },
        {
          "x": 1292378717,
          "y": 15
        },
        {
          "x": 1292465117,
          "y": 16
        },
        {
          "x": 1292579504,
          "y": 16
        },
        {
          "x": 1292637910,
          "y": 16
        },
        {
          "x": 1292724316,
          "y": 17
        },
        {
          "x": 1292810716,
          "y": 16
        },
        {
          "x": 1292897116,
          "y": 16
        },
        {
          "x": 1292983510,
          "y": 16
        },
        {
          "x": 1293069915,
          "y": 17
        },
        {
          "x": 1293847515,
          "y": 10
        },
        {
          "x": 1293933916,
          "y": 19
        },
        {
          "x": 1294020316,
          "y": null,
    "tip": ""
        },
        {
          "x": 1294106716,
          "y": null,
    "tip": ""
        },
        {
          "x": 1294193115,
          "y": null,
    "tip": ""
        }
      ]
    }
  ],
  "x_axis": {
    "stroke": 2,
    "tick-height": 5,
    "colour": "#000000",
    "grid-colour": "#777777",
    "min": 1291161976,
    "max": 1294193115,
    "steps": 151556,
    "labels": {
      "text": "#date:jS M Y#",
      "rotate": "90",
      "steps": 151556,
      "visible-steps": 1
    }
  },
  "y_axis": {
    "stroke": 2,
    "tick-length": 1,
    "colour": "#000000",
    "grid-colour": "#777777",
    "steps": 5,
    "visible-steps": 5,
    "min": 60,
    "max": 1
  }
}

THIS JSON IS BROKEN:

{
  "bg_colour": "#F4F4F4",
  "title": {
    "text": "title",
    "style": "{font-size:20px; color:#F90F0E; font-family: Verdana; text-align: center;}"
  },
  "y_legend": {
    "text": "value",
    "style": "{color:#F90F0E; font-size: 12px}"
  },
  "x_legend": {
    "text": "Date",
    "style": "{color:#F90F0E; font-size: 12px}"
  },
  "elements": [
    {
      "type": "line",
      "colour": "#0000FF",
      "width": 2,
      "text": "test",
   "on-show":{"type":""},
      "values": [
        {
          "x": 1291161976,
          "y": 42
        },
        {
          "x": 1291283358,
          "y": 10
        },
        {
          "x": 1291334716,
          "y": null,
    "tip": ""
        },
        {
          "x": 1291421116,
          "y": null,
    "tip": ""
        },
        {
          "x": 1291507516,
          "y": null,
    "tip": ""
        },
        {
          "x": 1291593910,
          "y": 19
        },
        {
          "x": 1291680310,
          "y": 19
        },
        {
          "x": 1291766710,
          "y": 19
        },
        {
          "x": 1291853117,
          "y": 15
        },
        {
          "x": 1291900196,
          "y": 16
        },
        {
          "x": 1291902293,
          "y": 17
        },
        {
          "x": 1291946711,
          "y": 16
        },
        {
          "x": 1292033116,
          "y": 15
        },
        {
          "x": 1292119510,
          "y": 17
        },
        {
          "x": 1292205917,
          "y": 15
        },
        {
          "x": 1292292315,
          "y": 17
        },
        {
          "x": 1292378717,
          "y": 15
        },
        {
          "x": 1292465117,
          "y": 16
        },
        {
          "x": 1292579504,
          "y": 16
        },
        {
          "x": 1292637910,
          "y": 16
        },
        {
          "x": 1292724316,
          "y": null
        },
        {
          "x": 1292810716,
          "y": 16
        },
        {
          "x": 1292897116,
          "y": 16
        },
        {
          "x": 1292983510,
          "y": 16
        },
        {
          "x": 1293069915,
          "y": 17
        },
        {
          "x": 1293847515,
          "y": 10
        },
        {
          "x": 1293933916,
          "y": 19
        },
        {
          "x": 1294020316,
          "y": null,
    "tip": ""
        },
        {
          "x": 1294106716,
          "y": null,
    "tip": ""
        },
        {
          "x": 1294193115,
          "y": null,
    "tip": ""
        }
      ]
    }
  ],
  "x_axis": {
    "stroke": 2,
    "tick-height": 5,
    "colour": "#000000",
    "grid-colour": "#777777",
    "min": 1291161976,
    "max": 1294193115,
    "steps": 151556,
    "labels": {
      "text": "#date:jS M Y#",
      "rotate": "90",
      "steps": 151556,
      "visible-steps": 1
    }
  },
  "y_axis": {
    "stroke": 2,
    "tick-length": 1,
    "colour": "#000000",
    "grid-colour": "#777777",
    "steps": 5,
    "visible-steps": 5,
    "min": 60,
    "max": 1
  }
}

i have just changed one of the y values to null. this is enough to break the graph.

1

There are 1 answers

0
someguy On BEST ANSWER