From e2d8f6164b5bc6001639232aac2f0051fbea2e04 Mon Sep 17 00:00:00 2001 From: Will Charczuk Date: Thu, 7 Jul 2016 22:30:16 -0700 Subject: [PATCH] updates. --- README.md | 30 ++++++++++++++++++++++++++++++ images/tvix_ltm.png | Bin 0 -> 9704 bytes 2 files changed, 30 insertions(+) create mode 100644 images/tvix_ltm.png diff --git a/README.md b/README.md index 0ae04e5..8fe9db0 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,36 @@ The key areas to note are that we have to explicitly turn on two features, the a Coming in the near future will be the option to output to SVG. +# Alternate Usage + +You can alternately turn a bunch of features off and constrain the proportions to something like a spark line: + + ![](https://raw.githubusercontent.com/wcharczuk/go-chart/master/images/tvix_ltm.png) + +The code to produce the above would be: + +```go +// note this assumes that xvalues and yvalues +// have been pulled from a pricing service. +graph := chart.Chart{ + Width: 1024, + Height: 100, + Axes: chart.Style{ + Show: false, + }, + FinalValueLabel: chart.Style{ + Show: false, + }, + Series: []chart.Series{ + chart.TimeSeries{ + XValues: xvalues, + YValues: yvalues, + }, + }, +} +graph.Render(chart.PNG, buffer) +``` + # Design Philosophy I wanted to make a charting library that used only native golang, that could be stood up on a server (i.e. it had built in fonts). diff --git a/images/tvix_ltm.png b/images/tvix_ltm.png new file mode 100644 index 0000000000000000000000000000000000000000..857ce5c26b994a1f81475b17c7ad8dded35d5ce1 GIT binary patch literal 9704 zcmYjXbyQVPv_7QL2#C@R0@5Yj-QC?S-GV434PN?E(%qfXE!`!}B?Y9p@8a*hwcbBx zowd(CduH~`eEXZdCqhL@8UvLO6#xJXSs4j606>Jj0v0dfVb5gE*+>AOsg#uv)$q9>aRlHuLLFHxx7s`FjB=)|M z1dOSg;fhto=~S!JE8&ALY!)txx1>pn4h3+}O^Xb4 zop~TUzX93De(|qrxo*8_p?Fr@ zF#d&row9)5vKBsr`7Ai1fP1N6O6*_r?hERMSsG$b_ zSJo&FYo}y8i8QE5rC`n^!B){Tu>3nw{M%=P_To;M31%a{&nEl;lAgll94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