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

issues with xFormat and yFormat #85

Open
hishoss opened this issue Jan 31, 2018 · 0 comments
Open

issues with xFormat and yFormat #85

hishoss opened this issue Jan 31, 2018 · 0 comments

Comments

@hishoss
Copy link

hishoss commented Jan 31, 2018

xFormat and yFormat seem to have no effect on a graph widget.

in my widgets.py I have:
class MyGraph(GraphWidget):
title = 'My Graph'
def get_data(self):
return [{'x': x, 'y': x} for x in range(5)]

then in dashing-config.js:

employers.addWidget('MyGraph', 'Graph', {
color: 'black',
scope: {
xFormat(n) {
return '(' + n + ')';
},
yFormat(n) {
return '(' + n + ')';
},
},
getData: function () {
var self = this;
Dashing.utils.get('myGraph', function(data) {
$.extend(self.scope, data, {
title: 'Test Graph!',
properties: {
renderer: 'bar',
padding: {
top: 0.1,
right: 0.1
}
},
});
});
},
interval: 2000
});

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

No branches or pull requests

1 participant