flot stackpercent setdata bug - javascript

I'm trying to update a flot graph using the stackpercent plugin. I wish to include the ability for users to turn legend items on and off, the problem is the chart isn't redrawn properly. The maths for determining % is ignored when using the draw() function as a result the graph doesn't look correct.
This is a Documented bug. However, i don't see it being fixed anytime soon.
How can i fix this?

Related

i can not show arabic-indic numbers in google chart

is it possiable to format the vaxis in google chart to arabic-indic
this is the officially documentation :
Google chart
however i looked through the whole documentation i did not find anything
i have no problem with xaxis the problem with vertical , i need them in format like ١،٢،٣...
There is a solution, but you'll have to use an undocumented feature, which will be documented at some point. You'll need to make this call sometime before you draw your chart.
google.visualization.NumberFormat.useNativeCharactersIfAvailable(true);
This works with material charts prior to v46, and also in classic charts starting with v46. See this example: https://jsfiddle.net/dlaliberte/6k8vdgz7/
You may see some problems depending on what formatting options you also specify.

chart.js | How to detect a summit/peak in line chart data

Chart.js 2.6.0
Expected Output
I have a problem to solve, I needed to generate this chart out of data:
I somehow managed to generate this chart.
Problems
I am searching for best way to detect summit/peak of data-mountains so that I could put a point(arc) at the top.
Is there a way to put labels in x-axis like in the picture above? I mean there is label after every 21 seconds.
Code so far
Gist: https://gist.github.com/shivabhusal/efb48db79128ffd926cc25960a1d875c
I overrode the draw function of Chart.js and drew lines and points on my own.
Any help will be appreciated, thanks.
Note: My data is not guaranteed to be pointy at the summit; sometimes it can get plateau.
Necessary CodePen is https://codepen.io/shivabhusal/pen/LjWyMe?editors=0010

Flot Charts Multi-series Bar Chart not using time

I've searched around and not finding a proper solution/explanation on how to get this right. Essentially what I'm trying to plot would resemble something of the following:
| #
|# #
|## ##
|______
fb tw
So essentially two categories, facebook (fb) and twitter (tw). Each category needs two bars for previous month and current month (they are counts). The data is retrieved from server side data.
What I need to know is how to get this chart to work using flot? Fiddle of what I have so far here: http://jsfiddle.net/thorne51/ExUH7/1/
I've tried using the orderBars plugin (as is apparent with the order property in the bars objects) with no success, not that I'm exactly sure what this does. Still very new to flot.
Edit
If anyone knows where decent documentation on flot and its plugins exist, or a tutorial, please share :)
You didn't have the Flot Orderbars plugin included in your fiddle. I included it and updated the fiddle: http://jsfiddle.net/ExUH7/4/
I would suggest you think about changing either the x-axis categories or the labels of your data, having them both be 'facebook' and 'twitter' leads to a confusing graph.

How to set the x axis dynamically in High Charts 2.3.5

I am trying to dynamically set the X axis rotation in Highcharts 2.3.5, but when the chart is redrawn the X axis remains unchanged.
By following the documentation I was able to set the rotation as the chart is constructed but I need to be able to set the rotation after that in response to other events on the page. Unfortunately I cannot update to the latest version of Highcharts in order to to this, and must remain using 2.3.5.
I am currently using this method:
chart.xAxis[0].options.labels.rotation = degrees;
chart.redraw();
This does seem to change the rotation value within the highcharts object but upon redrawing the chart nothing has actually changed.
Does anybody know of any way to do this without updating to the latest version?
Thanks in advance.
instead of that you can use chart.xAxis.update() method.
here is a link for its api documentation http://api.highcharts.com/highcharts#Axis.update
Hope it will help you.

d3 line chart not getting terminated

I am using d3.js along with dc.js and Crossfilter. As seen on the below image, the chart should end on 12/31/2016 as there is no data after that but keeps on going. Probably stuck at the last value. This is only happening in line chart. When I use a bar chart it does not happen.
Is this a known bug? Not sure what else I can do? I copied the configuration exactly from the dc.js example page (composite chart) and applied my dataset.
Found the problem. My dimensions were based on dates and some records had a typo in them. Instead of 2013, it had 2103 which caused the problem.

Categories