AnyChart stock chart - date extend overflow on X axis - javascript

I am building stock charts with AnyChart and I am stuck in a problem.
I get my data mapping directly from a third party data provider and it works perfectly. I have built a chart where users can draw, insert figures etc. The users are requesting a solution where they can draw into the future and scroll into dates later than the newest date in the data. The problem for me is that the chart date range selector is following the dates in the data mapping - so my question is if it's possible to set the date rangeSelector manually?
An example can be seen here: https://www.tradingview.com/symbols/OMXCOP-BO/
On the example you can just scroll to the right and into future dates even though the data is not following.
Does anyone have any idea how to make this work with anychart?
Thanks :-)

To achieve that you can use minimumGap() and maximumGap() functions. The article with live samples describes how it works.

Related

Merge two or more graphs using library

I am trying to make a dynamic graph something like as below:
Y-axis gives no. of users and x axis date range(For continuous graph )
x axis gives release of an algo on that date.(For discontinued graph)
I tried combined charts of highchart this and looked in google charts library.
Is there any way by how i can either directly generate a similar chart or merge two chart types in to one? Preferably using high charts or google graphs.
I guess we can merge two highcharts in to one but I am not very sure about it, also if we can Iam not sure how to do that.
Any help is appreciated.
Thanks
I am aware that you said "Preferably using high charts or google graphs", but I want to point out that this can be done very easily in C3.js using the "types" parameter to specify the graph type for each data item.
Demo: http://c3js.org/samples/chart_combination.html
I would suggest using plot bands to indicate release dates and types. You can dynamically add them using the addPlotBand() method (see http://api.highcharts.com/highcharts#Axis.addPlotBand). They would then overlay your "run of the mill" line chart showing number of users over time.
Assuming you have data that can distinguish between the release types, you could write code that adds a plot band of the desired color at the specific points on the x-axis.
I'd suggest making the plot bands have a from and to value thin enough (say, one interval or one date's worth) so it shows up as the thin stripes in your example.
You'd need to add a manual legend to show users what those colors mean, since plot bands wouldn't automatically show up in a Highcharts legend.
I hope this helps!

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.

Javascript simple barchart with tooltip

I have some metrics to display, I need a simple barchart to show values for every day in month, and it doesn't need to have any labels or legend, when you hover the day, the data is displayed. I found this http://codepen.io/deegill/pen/macik which is something that I need but it cost 90$ smallest package. Does anyone have chart like this which I can use in my project?
A set of reusable charts using D3
http://nvd3.org/examples/line.html
If you want to make any chart I'd look at using D3. It's a pretty smart js framework that allows you to display data in a lot of different ways. Here is an example of it displaying a bar chart. And here is another example that uses time as the x value.
Google Charts API
https://google-developers.appspot.com/chart/interactive/docs/gallery/barchart
g.Raphael.js
http://g.raphaeljs.com/
Highcharts.js (Free for non-commercial use)
http://www.highcharts.com/
I've been using Flot for a few years now, and I have no complaints. Might take a little effort to get started, but we use it commercially, and it's great (and free).

Linking dygraphs.js to d3 charts

I'm currently working on building a charting web application, and I've chosen dygraphs for my time series data (Two weeks of data at an hourly level, if anyone finds this information relevant). On the same page, I also have a couple of customized d3.js charts that pull metrics from the same database as the trendline.
I want to know if I will be able to link the selection on my dygraph line (Supposing I zoom in on 3 hours worth of data, i.e., 3 rows) - to my d3 charts, so that the data in the d3 charts also get filtered down to the date range chosen by zooming in?
I'm quite the amateur here, and apologize if my question seems vague, but any sense of direction would be helpful.
I'm guessing I should be able to do this by modifying some class in the dygraphs source code, or reference the same from my d3 chart.
Thanks.
You shouldn't have any trouble doing this. There's no need to modify the dygraphs source. You can implement handlers on the dygraph object (zoomHandler or drawCallback, most likely) which update the D3 chart.
See this demo for an example of synchronization between multiple dygraphs.

Editable javascript chart - interactively resize bars or pie sections

I need a library or a framework plugin that can draw charts that can be modified real-time by resizing part of the chart itself. Is there such thing?
I plan to use it for adjusting the chart values. Mostly for controlling amount allocation.
For example. You have 4 hours and you have 5 distinct types of tasks. I want the user to be able to allocate time for each task and see visually what's the impact on the available time.
I think Visually Editable Charts of Fusion Charts is what you are looking for.
We use various charts from http://code.google.com/apis/chart/ for our web app, and it works great.
The chart are loaded once, and refreshed, each time the user change a value, with new data through their Javascript API in real-time.
gRaphael should be the most popular:
http://g.raphaeljs.com/
I can recommend HighCharts:
http://www.highcharts.com/
Found a few options: http://jamesalvarez.co.uk/uncategorized/draggable-piechart-js-class and http://www.shodor.org/interactivate/activities/PieChart/.
The first one looks the most promising.

Categories