Git Product home page Git Product logo

freeboard-jqplot's Introduction

Freeboard jqPlot Widget Plugin

This is a widget plugin for Freeboard (open source web ui dashboard) that allows dashboard widget authoring using jqPlot

Screenshot

Screenshot

Installation

Copy the plugin (index.js in this repo) to your freeboard installation, for example:

$ cp ./index.js /freeboard/plugins/jqplot

edit the freeboard index.html file and add a link to the plugin near the end of the head.js script loader, like:

head.js(
  'js/freeboard_plugins.min.js',
  'plugins/jqplot/index.js',
  $(function() {
    //DOM Ready
    freeboard.initialize(true);
  })

For a better development experience checkout the widget template which has tooling that lets you configure a widget instance in files and auto-update a dashboard.json.

freeboard-jqplot's People

Contributors

jicao avatar jritsema avatar paradoxguitarist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

freeboard-jqplot's Issues

BarRenderer Ticks

I have tried several ways using a combination of different [ ] and I can't work out how to add tick titles for Bar charts.

[[3,7]]
works fine but giving ticks of 1 and 2

I have tried things like
[[[3,7]][['test','test2']]]
And having no joy.. Can I get a hint?

Something simple I'm missing

Love your plugin! I'm trying to do something simple that is eluding me. I have a JSON datasource that looks like:

{"today":{"maxCounts":1,"NEW":1,"ON_CALL":0,"RECALL":0,"TRANSCRIPTS":1,"QA":0},"ymax":10}

I'm successfully making a bar chart, but I'd like to use ymax to set the y axis scale, along the lines of

{   
    seriesDefaults: {
        renderer:$.jqplot.BarRenderer,
        rendererOptions: {
            varyBarColor: true
        }   
    },  
    axes:{
        xaxis:{
            renderer: $.jqplot.CategoryAxisRenderer
        },  
        yaxis:{
            max: ymax
        }   
    },  
    grid: {background: '#111', gridLineColor: '#222', borderColor: '#222'}
}   

but I don't know how to access "ymax". This isn't an issue with the plugin per se, but a request for help. Thanks!

Line chart

I tried several times to do a simple line chart, but I can't see anything.
I tried with this simple code in chart options:

{
    seriesDefaults: {
        rendererOptions: {
            showMarker: false
        }   
    }
}

And this JSON:
{"res":0.5}

I'm missing something but I don't know what.
If you could replay me with an examaple of a line chart I would be grateful.

I tried with your example in the image, but I can't see anything either.

Thank you very much!

Freeboard.io with JQPlot

Hi there,

totally new to freeboard and JSON... I am trying to get this JQPlot working on freeboard.io, so in the online version. I managed to install the plugin making a link via rawgit.com.

I can add a new widget called JQPlot. But as soon as i filled in all the properties and click OK the widget is not shown in the pane. Basically i am thinking that my JS code for the chart options is not correct. This is what is in there now:

{
series [ {color: 'red'} ],
seriesDefaults: {
renderer:$.jqplot.BarRenderer,
// Show point labels to the right ('e'ast) of each bar.
// edgeTolerance of -15 allows labels flow outside the grid
// up to 15 pixels. If they flow out more than that, they
// will be hidden.
pointLabels: { show: true, location: 'e', edgeTolerance: -15 },
// Rotate the bar shadow as if bar is lit from top right.
shadowAngle: 135,
// Here's where we tell the chart it is oriented horizontally.
rendererOptions: {barDirection: 'horizontal'}},
axes: {yaxis: {renderer: $.jqplot.CategoryAxisRenderer}}}

Could you give me a hint if this is correct or what i am doing wrong? The rest of the properties is looking like this:

image

jqplot widget using historical data?

Hi,
I really like those charts - but I´m looking for a way to use this with "historical data" coming from a JSON (or CSV, I don´t care).

Use case:
I have a URL that provides a JSON file that always has the latest 2 hours of temperature data (including time stamps). I would like to get that data charted right away when the dashboard is loaded.
Also, it should poll the JSON periodically to get the latest data and update the chart with it.

Freeboard is great - but it really focusses on real time data and I would like some historical data and can´t get that to work ...

An example how to do that would be highly appreciated, I´m getting confused by your chart data item needing something like [[1,2],[3,4]] - why the double bracket.
Could I add a Javascript snippet here that pulls the JSON via AJAX and pushed the array to jqplot?

Thanks - MacSass

Donut with totalLabel not working

Hello,

Here is my chart options :

{
	seriesDefaults: {
		renderer: jQuery.jqplot.DonutRenderer,
		shadow: false,
		rendererOptions: {
			showDataLabels: true,
			sliceMargin: 4,
			fill: true, // Fill with color
			startAngle: -90, // Change angle of the pie
			showDataLabels: true,
			dataLabels: 'value',
			totalLabel: true,
		},
	},
}

And here are my chart data (The one from the lib example) :

[[['Heavy Industry', 12],['Retail', 9], ['Light Industry', 14], ['Out of home', 16], ['Commuting', 7], ['Orientation', 9]]]

But the Total is not showing (and is not on the html source)

Anyone can help ?

Please add install instructions

I did this:

  1. Copied index.js to /freeboard/js/jqplot-plugin.js
  2. Added to main freeboard index.html
    head.js("js/freeboard_plugins.min.js",
    "js/jqplot-plugin.js",

But I think it would be better it add it to the Gruntfile.js so it can be properly deployed.

Facing a problem while using jqplot

dfrfr
Hello,
The above is the screenshot of our widget using jqplot to display data in the format of bar chart.
here are options we provided in the jqplot options:

{
series: [{
color: 'red'
}],
seriesDefaults: {
renderer: $.jqplot.BarRenderer,
// Show point labels to the right ('e'ast) of each bar.
// edgeTolerance of -15 allows labels flow outside the grid
// up to 15 pixels. If they flow out more than that, they
// will be hidden.
pointLabels: {
show: true,
location: 'e',
edgeTolerance: -15
},
// Rotate the bar shadow as if bar is lit from top right.
shadowAngle: 135,
// Here's where we tell the chart it is oriented horizontally.
rendererOptions: {
barDirection: 'vertical'
}
},
axes: {
yaxis: {
renderer: $.jqplot.CategoryAxisRenderer
}
}
}
But the widget is showing blank without any barcharts with the data we provided.

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.