jritsema / freeboard-jqplot

This is a widget plugin for http://freeboard.io that allows dashboard widget authoring using http://www.jqplot.com
MIT License
28 stars 18 forks source link

BarRenderer Ticks #7

Open thickey256 opened 7 years ago

thickey256 commented 7 years ago

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?

adtyashgl commented 7 years ago

The way I have accomplished this is by adding ticks in the chart option.

`{ series: [ {color:'red'} ], animate: !$.jqplot.use_excanvas, 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,

        },
        **xaxis: {
            renderer: $.jqplot.CategoryAxisRenderer,
            ticks: [256,283,287,110]
        },**

    }
}`

My chart options are generated via a data source so I fill the ticks array there. Hope it helps

aneeshmalhotra commented 7 years ago

Hi, I am seeking some help for jqplot plugin.

I have followed the installation steps i.e. copy the .js file to plugin/jqplot folders and mentioned the same details in index.html file. I can see jqplot widget. I need some help in what data to add in chart data and chart options. I tried providing non json datasource from application like weather API. and I have copied above JS script in chart option. I cannot see anything in Widget.

aneeshmalhotra commented 7 years ago

Figured out. Thanks

swath-0309 commented 4 years ago

Hi, I am seeking some help for jqplot plugin.

I have followed the installation steps i.e. copy the .js file to plugin/jqplot folders and mentioned the same details in index.html file. I can see jqplot widget. I need some help in what data to add in chart data and chart options. I tried providing non json datasource from application like weather API. and I have copied above JS script in chart option. I cannot see anything in Widget.

Figured out. Thanks

can u share how to do?

aneeshmalhotra commented 4 years ago

Hey,

Sorry, dont remember now what I had done. It was quite a long time back.

regards, Aneesh Malhotra

On Thu, 23 Jul 2020, 09:21 swath-0309, notifications@github.com wrote:

Hi, I am seeking some help for jqplot plugin.

I have followed the installation steps i.e. copy the .js file to plugin/jqplot folders and mentioned the same details in index.html file. I can see jqplot widget. I need some help in what data to add in chart data and chart options. I tried providing non json datasource from application like weather API. and I have copied above JS script in chart option. I cannot see anything in Widget.

Figured out. Thanks

can u share how to do?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jritsema/freeboard-jqplot/issues/7#issuecomment-662856810, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGOBMRNJQKUQ2XWJP5LXS5DR47QIDANCNFSM4CSDJUYA .

swath-0309 commented 4 years ago

Ok no problem sir.

On Thu, 23 Jul, 2020, 8:11 PM aneeshmalhotra, notifications@github.com wrote:

Hey,

Sorry, dont remember now what I had done. It was quite a long time back.

regards, Aneesh Malhotra

On Thu, 23 Jul 2020, 09:21 swath-0309, notifications@github.com wrote:

Hi, I am seeking some help for jqplot plugin.

I have followed the installation steps i.e. copy the .js file to plugin/jqplot folders and mentioned the same details in index.html file. I can see jqplot widget. I need some help in what data to add in chart data and chart options. I tried providing non json datasource from application like weather API. and I have copied above JS script in chart option. I cannot see anything in Widget.

Figured out. Thanks

can u share how to do?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/jritsema/freeboard-jqplot/issues/7#issuecomment-662856810 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AGOBMRNJQKUQ2XWJP5LXS5DR47QIDANCNFSM4CSDJUYA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jritsema/freeboard-jqplot/issues/7#issuecomment-663046329, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQEYDAL5Z5B24TVRPZRVSQTR5BDYNANCNFSM4CSDJUYA .