Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

advanced_plot fails if MeterGaugeRenderer is used #22

Open
Wheart opened this issue May 21, 2015 · 1 comment
Open

advanced_plot fails if MeterGaugeRenderer is used #22

Wheart opened this issue May 21, 2015 · 1 comment

Comments

@Wheart
Copy link

Wheart commented May 21, 2015

pointLabels conflicts (?) with MeterGauge - it doesn't contain "_xaxis" and throws an exception:
"this[ax]._ticks[0] is undefined"
around line 283 in jqplot.pointLabels.js
Simply commenting out js from list in settings.py "repairs" MeterGauge, but probably break some other renderers.

@vi4m vi4m added the bug label May 21, 2015
@ghost
Copy link

ghost commented May 25, 2015

Confirm that, as a workaround you can disable pointLabels in a one specific tile (in your case MeterGauge so that there will be no need to disabling pointLabels in whole app by commenting pointLabels in settings.py).

The 'fixing' part is:

    "series":[{
        "pointLabels":{
            "show": false
        }
   }],

from checked and working example:

curl "http://localhost:7272/api/v0.1/xxx/push" \
    -X POST \
    -d "tile=advanced_plot"\
    -d "key=adv_id1"\
    -d 'data={"title": "Metric Tons per Year", "description": "",
            "plotData": [[1]]}'


curl "http://localhost:7272/api/v0.1/xxx/tileconfig/adv_id1" \
    -X POST\
    -d 'value={
            "title": "Network Speed",
            "series":[{
                "pointLabels":{
                    "show": false
                }
            }],
            "axesDefaults": {
                "show": false
            },
            "seriesDefaults": {
                "renderer": "MeterGaugeRenderer",
                "rendererOptions": {
                    "label": "MB/s"
                }
            }
        }'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants