Skip to content

Commit 3d6a43f

Browse files
author
Niilo Keinänen
committed
Tweak test
1 parent e1f452f commit 3d6a43f

File tree

3 files changed

+15
-18
lines changed

3 files changed

+15
-18
lines changed

test/index.js

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
import express from "express";
2-
import { PNG } from "pngjs";
3-
import { lightningChart, renderToPNG } from "@lightningchart/lcjs-headless";
4-
import { flatThemeLight } from "@lightningchart/lcjs-themes";
1+
const express = require("express");
2+
const { PNG } = require("pngjs");
3+
const {
4+
lightningChart,
5+
renderToPNG,
6+
} = require("@lightningchart/lcjs-headless");
7+
const { flatThemeLight } = require("@lightningchart/lcjs-themes");
8+
const { ColorRGBA, SolidFill } = require("@lightningchart/lcjs");
59

610
const app = express();
711
const port = 3000;
812

913
app.get("/", (req, res) => {
10-
const lc = lightningChart({
11-
// Valid until 8/6/2024
12-
license:
13-
"0002-n6Q3wipxRCPK7PHm1Z1p6PdhNNqeKwClN/s+aUwl3vT54A0lse0e9Ryv9JY4YzR8avVBVjTpcgbR7Q8DS2egZAHn-MEUCIQC87Etz4Jn4NLyctnrTCjVOHKsy7VSxa99DG6arbb1RfgIgZKtGhZpmATUsBZ6fkq834+Sq137gFyv7lsz3OVndGvA=",
14-
licenseInformation: {
15-
appTitle: "LightningChart JS Trial",
16-
company: "LightningChart Ltd.",
17-
},
18-
});
14+
const lc = lightningChart({});
1915
const chart = lc.ChartXY({ theme: flatThemeLight });
16+
chart.setSeriesBackgroundFillStyle(
17+
new SolidFill({ color: ColorRGBA(255, 0, 0) })
18+
);
2019
const chartOutput = renderToPNG(chart, 800, 640);
2120
const outputBuff = PNG.sync.write(chartOutput);
2221
res.setHeader("Content-Type", "image/png");

test/package-lock.json

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"name": "test",
3-
"type": "module",
43
"version": "1.0.0",
54
"description": "",
65
"main": "index.js",
@@ -11,7 +10,7 @@
1110
"author": "",
1211
"license": "ISC",
1312
"dependencies": {
14-
"@lightningchart/lcjs-headless": "file:../lightningchart-lcjs-headless-2.0.0.tgz",
13+
"@lightningchart/lcjs-headless": "^2.0.0",
1514
"@lightningchart/lcjs-themes": "^4.0.2",
1615
"express": "^4.19.2",
1716
"pngjs": "^7.0.0"

0 commit comments

Comments
 (0)