Skip to content

Instantly share code, notes, and snippets.

@andredumas
andredumas / custom.accessor.js
Last active August 19, 2016 03:06
TechanJS Accessors Example
/**
* Demonstrating configuring a techanjs plot to accept and plot custom data types.
*/
// Either, update the default plot accessor
// All plots have default accessors. Here we are updating the default and redefining how
// to get close from the data
candlestick.accessor().close(function(d) {
return d.currentBid; // Where d is an item in your supplied array
});
@andredumas
andredumas / README.md
Last active September 28, 2016 11:53 — forked from fojt/data.csv
TechanJS Aroon

Aroon calculation and rendering demo.

@andredumas
andredumas / README.md
Last active March 20, 2018 01:25
TechanJS Feed

Simulating refreshing receiving a 'real-time' (constantly updating) data feed. Adheare's to D3's general update pattern. When the end of the data feed is reached, intra-day data updates will be simulated

@andredumas
andredumas / README.md
Last active September 28, 2016 12:05
TechanJS Crosshair

Chart crosshair sample, including setting annotations of different axis orientation.

@andredumas
andredumas / README.md
Last active September 28, 2016 12:00
TechanJS Axis Annotation

Axis labels, coloring, orientation and positioning.

@andredumas
andredumas / README.md
Last active November 29, 2020 14:17
TechanJS Supstance

Interactive support and resistance line rendering on a chart. Illustrating setting start end end points and horizontal line at full width.

@andredumas
andredumas / README.md
Last active September 28, 2016 12:09
TechanJS Trendlines

Interactive trendline rendering on a chart.

@andredumas
andredumas / AAPL.csv
Last active September 28, 2016 12:06
TechanJS Multiple Plot Handling
Date Open High Low Close Volume
14-Jul-14 95.86 96.89 95.65 96.45 42810155
11-Jul-14 95.36 95.89 94.86 95.22 34018228
10-Jul-14 93.76 95.55 93.52 95.04 39685552
9-Jul-14 95.44 95.95 94.76 95.39 36436440
8-Jul-14 96.27 96.80 93.92 95.35 65221678
7-Jul-14 94.14 95.99 94.10 95.97 56467939
3-Jul-14 93.67 94.10 93.20 94.03 22891753
2-Jul-14 93.86 94.06 93.09 93.48 28465073
1-Jul-14 93.52 94.07 93.13 93.52 38223477
@andredumas
andredumas / README.md
Last active September 28, 2016 12:11
TechanJS financetime scale

Demonstrating the difference between zooming techan time scale, clamped and non clamped zooming and d3 time scale for both daily and intraday data. D3's time scale is continuous and linear, techan.scale.financetime plots only points available in the data's date domain without linear (weekend, market holiday) gaps.

Note: techan.scale.financetime only plots the available domain, unlike d3, and will not scale or translate to values outside of the domain.
@andredumas
andredumas / default.rb
Created June 27, 2014 02:10
Headless Google Cloud Print Upstart script and a partial supporting recipe
# NOTE: This is partially complete and not ready for use, watch out for <user> tokens!
# Requires:
# * Printer drivers installed and registered with CUPS
# * Chrome installation (36 Beta was required at the time due to https://code.google.com/p/chromium/issues/detail?id=375841#c6)
# * A Generated "Service State" file (Instructions https://support.google.com/a/answer/2906017?hl=en)
package "cups"
service "cups" do
action [:enable, :start]