Comments (11)
I found a way to get around this for the moment :
instead of passing values in the form [ [dates], [prices] ], my data is in the form [ [dates], [closing price], [ {o,h,l,c} ] ].
The I re-wrote the candle adapter to get the o,h,l,c from data[2].
I works for the moment, but the min/max are computed by envision only on the closing prices, so as long as the candles do not overflow the closing price too much, it is fine, but if the candles have "long tails", some part might not be displayed.
So it would be nice to have a way to overload the min & max calculation.
Thank you.
from envisionjs.
Ah, you want to skipPreprocess. There's an example of it here:
http://humblesoftware.com/envision/demos/ajax
Most any of the esoteric graph types like that, the user does not want to
downsample.
-c
On Tue, Aug 21, 2012 at 11:55 AM, Sylvain Vieujot
[email protected]:
I found a way to get around this for the moment :
instead of passing values in the form [ [dates], [prices] ], my data is in
the form [ [dates], [closing price], [ {o,h,l,c} ] ].
The I re-wrote the candle adapter to get the o,h,l,c from data[2].I works for the moment, but the min/max are computed by envision only on
the closing prices, so as long as the candles do not overflow the closing
price too much, it is fine, but if the candles have "long tails", some part
might not be displayed.
So it would be nice to have a way to overload the min & max calculation.Thank you.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/14#issuecomment-7905844.
from envisionjs.
Great. I will try this.
Thank you !
from envisionjs.
All set with this?
from envisionjs.
I did not try it yet.
Still tuning my multichart stuff.
from envisionjs.
I did not manage to use the skipPreprocess to solve this.
I understand how the skipPreprocess can be used to load data, but I don't see how this helps adjusting the axes ranges.
Anyway I can live without this for the moment, so I am closing the issue and will re-open it later if ever I need it.
from envisionjs.
I'll get together an example.
Maybe open a thread on the google group?
On Fri, Aug 24, 2012 at 8:48 AM, Sylvain Vieujot
[email protected]:
I did not manage to use the skipPreprocess to solve this.
I understand how the skipPreprocess can be used to load data, but I don't
see how this helps adjusting the axes ranges.
Anyway I can live without this for the moment, so I am closing the issue
and will re-open it later if ever I need it.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/14#issuecomment-8000289.
from envisionjs.
For the moment I solved it by adding this to my candle adapter :
extendYRange: function (axis, data, options) {
var maxHigh = null, minLow = null;
for (i = 0; i < data.length; i++) {
var candleIndex = data[i][0];
var qb = options.quotes[candleIndex];
if( maxHigh === null || maxHigh < qb.h )
maxHigh = qb.h;
if( minLow === null || minLow < qb.l )
minLow = qb.l;
}
if( maxHigh != null && minLow != null ){
axis.max = Math.max( maxHigh, axis.max );
axis.min = Math.min( minLow, axis.min );
}
}
It will do it for some time.
The really nice thing would be to integrate the candle adapter within envision.
from envisionjs.
Ahh I understand! That's the correct solution, and an issue inside Flotr2.
Feel free to create a topic-branch and submit a pull request over there.
I'll incorporate it.
On Fri, Aug 24, 2012 at 1:45 PM, Sylvain Vieujot
[email protected]:
For the moment I solved it by adding this to my candle adapter :
extendYRange: function (axis, data, options) {
var maxHigh = null, minLow = null;for (i = 0; i < data.length; i++) { var candleIndex = data[i][0]; var qb = options.quotes[candleIndex]; if( maxHigh === null || maxHigh < qb.h ) maxHigh = qb.h; if( minLow === null || minLow < qb.l ) minLow = qb.l; } if( maxHigh != null && minLow != null ){ axis.max = Math.max( maxHigh, axis.max ); axis.min = Math.min( minLow, axis.min ); }
}
It will do it for some time.
The really nice thing would be to integrate the candle adapter within
envision.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/14#issuecomment-8009622.
from envisionjs.
Ok, I will do that.
One issue is that to work properly with envision, I customized my dataset :
data[0] = x
data[1] = y
data[2] = {o:..., h:..., l:..., c: ...., v:....., d:....} // JSON for the full candle info : open, high, low, close, volume, date
That way it works with minimal changes in Envision.
I will submit the pull request as it works for me now, but you might have different views on the input parameters.
from envisionjs.
Pull request done.
from envisionjs.
Related Issues (20)
- Multichart HOT 5
- Several rightmost points are truncated in chart HOT 2
- Bug: destroy chart never free memory HOT 2
- envision.min.js breaks some Flotr options HOT 3
- Selection in the 'summary' area selects text from other sections HOT 2
- Impossible to select the entire summary? HOT 10
- Handling of null data
- Browser crash - Too many ticks added when min and max are of similar values
- When xaxis mode : time, mousetracker displays milliseconds, not converted time stamp.
- Realtime chart range selection problem HOT 5
- Where is the flags feature?
- Finance: Is there a way to show lines of differing height at different Y points?
- Bug: Multiple time series, different time stamps, rendering error
- Broken links in README
- Annotation Feature? HOT 1
- Update on Envision latest version HOT 1
- [Vuln] SSRF vulnerability in `curl_init` Function of `proxy.php` File (Envision.js latest version)
- [Vuln] SSRF vulnerability in `readile` Function of `proxy.php` File (Envision.js latest version)
- process to consider envison.js FOSS 3PP code as our application code
- What is the EoS/EoM/EoL?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from envisionjs.