UNPKG

4.09 kBMarkdownView Raw
1# TSIClient: The Azure Time Series Insights JavaScript SDK
2
3<a href="https://tsiclientsample.azurewebsites.net"><img src="https://insights.timeseries.azure.com/favicon.ico" align="left" hspace="10" vspace="6" height="100px"></a>
4
5The Azure Time Series Insights JavaScript SDK (aka **tsiclient**) is a JavaScript library for Microsoft Azure Time Series Insights, featuring components for data visualization and analytics, utilities for making calls directly to the TSI Platform API, and more. **tsiclient** also ships with an associated CSS file (which you must include using your preferred css linking method), which makes the components look great out of the box.
6
7
8[![License: MIT](https://img.shields.io/badge/License-MIT-red.svg)](https://opensource.org/licenses/MIT) [![npm version](https://badge.fury.io/js/tsiclient.svg)](https://badge.fury.io/js/tsiclient)
9
10## Resources
11
12* [API Reference documentation](docs/API.md)
13* [Product documentation](https://docs.microsoft.com/azure/time-series-insights/)
14* [Authorization and authentication](https://docs.microsoft.com/azure/time-series-insights/time-series-insights-authentication-and-authorization)
15* [Hosted tsiclient samples](https://tsiclientsample.azurewebsites.net)
16
17## Installing
18
19If you use npm, `npm install tsiclient`. You can also load directly from [unpkg](https://unpkg.com/tsiclient/). For example:
20
21```html
22<script src="https://unpkg.com/tsiclient@latest/tsiclient.js"></script>
23<link rel="stylesheet" type="text/css" href="https://unpkg.com/tsiclient@latest/tsiclient.css"></link>
24```
25
26To import all of **tsiclient** into an ES2015 application, import everything into a namespace, like so...
27
28```js
29import TsiClient from "tsiclient";
30
31// later, when you want a line chart
32let tsiClient = new TsiClient();
33let lineChart = new tsiClient.ux.LineChart(document.getElementById('chart'));
34```
35
36You can also import components individually. If you only need the LineChart, you can import it like so...
37
38```js
39import LineChart from 'tsiclient/LineChart'
40
41// later when you want a line chart
42let lineChart = new LineChart(document.getElementById('chart'));
43```
44Importing individual components can help significantly reduce your bundle size as they work better with tree shaking. This is the recommended approach if your app only consumes specific components.
45
46To import the tsiclient stylesheet into an ES2015 application, import either `tsiclient.css` or `tsiclient.min.css`, like so...
47
48```js
49import 'tsiclient/tsiclient.css' // Standard styles
50import 'tsiclient/tsiclient.min.css' // Minified styles
51```
52
53## Release Notes
54
55Starting with version 1.3.0, discrete events and state transitions will be represented just like numeric time series in the LineChart component. This may be a breaking change for users representing non-numeric series in the line chart using the "events" and "states" Chart Options. For usage instructions, consult [this example](https://tsiclientsample.azurewebsites.net/noauth/multipleseriestypes.html) and the associated [documentation](https://github.com/microsoft/tsiclient/blob/master/docs/UX.md#line-chart).
56
57
58## Contributing
59
60This project welcomes contributions and suggestions. Most contributions require you to agree to a
61Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
62the rights to use your contribution. For details, visit https://cla.microsoft.com.
63
64When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
65a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
66provided by the bot. You will only need to do this once across all repos using our CLA.
67
68This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
69For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
70contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
\No newline at end of file