Open Flash Chart 2 BUG patch de dz
-
12-10-2019 - |
Question
J'utilise la version patchée (http://ofc2dz.com) parce que je besoin de la fonctionnalité de "null-gap": true. i ai un graphique linéaire qui fonctionne très bien, avec des valeurs nulles et sans. lorsque je change une valeur y à zéro, l'affichage graphique avec un panneau bleu dans la partie supérieure. les bonnes nouvelles sont, j'ai le JSON qui fonctionne, et JSON avec le petit changement qui casse le graphique. J'espère un gourou graphique flash ouvert repérera l'erreur je l'ai fait. J'ai collé le JSON ci-dessous.
Merci pour toute aide
JSON TRAVAUX:
{
"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
}
}
JSON EST CASSÉ:
{
"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
}
}
Je viens de changer l'une des valeurs y à zéro. cela suffit pour briser le graphique.
La solution
ce billet est maintenant fermé: http://forums.openflashchart.com/viewtopic.php?f = 5 & t = 2876 & p = 7498 # p7498