I am considering applying server-side licensing for my javerScript application.
In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)
However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)
I wonder if there is a sample code implemented in C++ for server-side licensing.
Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?
- sachin patel asked 1 year ago
- last active 12 months ago
Can I implement a feature in SciChart that allows me to pause and resume rendering activity on a SciChart renderable surface when a user clicks on the SciChart renderable surface?
- Vishnu K U asked 6 months ago
- last active 5 months ago
I have two charts in my app. Is there a way that I can make a rollover tooltip on a heatmap chart and the x visible range updates accordingly on another chart when the cursor moving around on the heatmap?
I had this function in Android version with the method InternalUpdate from CustomHeatmapTooltip which extended from UniformHeatmapTooltip. I wonder if there’s a listener for the tooltip.
Thanks.
- Gang Xu asked 2 years ago
- last active 1 year ago
I have a chart in the center of the page and the chart will resize according to the browser window size. When I expand the browser window, the chart will expand to fit the browser size. In this case, the chart grows downward gradually (with animation). How can I remove this animation effect when resizing the chart?
In case it’s related to my style. Here are my markup and style for reference:
//Markup
//Style
.contentPanel {
flex: 1 1 auto;
width: calc(100% – 335px);
max-height: calc(100vh – 108px);
display: flex;
flex-direction: column;
}
.chartContainer {
position: relative;
margin: 10px 0;
display: flex;
flex-direction: column;
flex: 1;
}
.scichart-root {
width: 100%;
height: 100%;
}
- Kelly Chan asked 1 year ago
- last active 1 year ago
RenderableSeries Hit-Test is not working as expected. Some bugs on the the RenderableSeries Hit-Test. Distance between two points are less then its working most of the time and getting the isHit variable getting true. But the distance is high then the lines near to the point only getting the isHit true. I am attaching the image when the red marked area is working fine and the blue marked area not working.
- Arun Surendran asked 3 years ago
- last active 3 years ago
I was just going through the tutorial and had my project initializing the graph and drawing a few datapoints. Out of the blue after recently building with no new changes, I’ve been getting hit with the attached message. I’ve even tried deleting the scichart sub-folder within node_modules and reinstalling scichart via npm to no avail.
- Dylan Krupp asked 3 years ago
- last active 3 years ago
Hello, I just started evaluating your 2D JS chart library and am running into an error (below) and don’t know what I should do to continue forward:
Error:
wasm streaming compile failed: TypeError: Failed to execute ‘compile’
on ‘WebAssembly’: Incorrect response MIME type. Expected
‘application/wasm’.falling back to ArrayBuffer instantiation
failed to asynchronously prepare wasm: CompileError: WebAssembly.instantiate(): expected magic word 00 61 73 6d, found 3c 21 44 4f @+0
CompileError: WebAssembly.instantiate(): expected magic word 00 61 73 6d, found 3c 21 44 4f @+0
Could not load SciChart WebAssembly module.
Check your build process and ensure that your scichart2d.wasm, scichart2d.data and scichart2d.js files are from the same versionUncaught (in promise) Could not load SciChart WebAssembly module.
Check your build process and ensure that your scichart2d.wasm, scichart2d.data and scichart2d.js files are from the same version
I am copying the scichart2d.data and scichart2d.wasm in my webpack config as follows (according to your tutorials):
config.plugins.push(
new CopyPlugin({
patterns: [
// {
// from: 'src/index.html',
// to: '',
// },
{
from: 'node_modules/scichart/_wasm/scichart2d.data',
to: '',
},
{
from: 'node_modules/scichart/_wasm/scichart2d.wasm',
to: '',
},
],
})
I have since then done the following but to no avail:
- Restart my webpack-dev-server -> In chrome, “Empty cache and refresh”
- Delete my node_modules folder -> yarn install -> yarn start
Can someone please help me with this issue at an earliest convenience.
- sachin patel asked 2 years ago
- last active 4 months ago
When hardware acceleration is not enabled from the client side i am getting the follwong error in the console and the chart becomes empty.
Can we have a caetain fallback ui for this error so that when hardware acceleration is disabled we can show some error in the client side instead of frozen screen
- Saksham Jaiswal asked 1 year ago
- last active 1 year ago
I’m trying to add rollover / tooltip to a chart, which uses sweeping. First, everything is working fine, but after updating the data over more then one page, the rollover is messing around with the data.
I created a codesandbox with the vitalsign demo: https://codesandbox.io/p/sandbox/javascript-vital-signs-ecg-medical-chart-example-forked-2zqcs3
First the rollover works great. Wait until the data is updated to the left side. Then you’ll see the messed up values and rollover points.
- J Quader asked 3 months ago
- last active 3 months ago
I am considering applying server-side licensing for my javerScript application.
In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)
However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)
I wonder if there is a sample code implemented in C++ for server-side licensing.
Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?
- haba haba asked 8 months ago
- last active 4 weeks ago
Hello Scichart Team again,
I’m trying to replicate anything like this (check Screenshot_2.png).
I can update the scichart background, but I just wanted to have a single color in the background, but it seems that there is an overlap of colors in X / Y as I show in the next printscreen (check Screenshot_3.png)
How I can solve this?
Waiting for feedback.
Many thanks,
Pedro Cruz
- Ricardo Diz asked 3 years ago
- last active 3 years ago
Hi there,
I am experiencing a problem with a license key error when I deployed the project to the staging environment.
Here are the steps I followed:
- I registered the domain and test domain on scichart.com/profile.
- I generated a runtime key.
- I included that key in the code base and then deployed it.
I have attached a screenshot below that shows the errors.
- Umer Nawaz asked 9 months ago
- last active 9 months ago
Hi there,
I would like to use a column chart with labels. Our client tends to use really long names for these labels, so I was wondering if it is possible that these labels wrap. I could find no property in the docs or source that achieves this. The attached screenshot shows the current (and undesired) rendering.
The current behavior seems to be that labels in between are hidden when longer labels overlap them. Is this a configurable property? In our case, the labels may never be hidden.
Kind regards,
Tim Havinga
- Tim Havinga asked 3 years ago
- last active 3 years ago
I have a simple need to display a horizontal heatmap based on values along the x-axis. So if value on x-axis is 1, color shown on the heatmap should be orange, if the next value is 2, red color bar appears to next the previous orange etc. Something like this (see attached graphic also):
Heatmap: [=orange=red=green]
values along x-axis: [22.05, 24.00, 30.00 ]
So the code I am trying is as follows:
export async function renderHeatMap(element)
{
const { sciChartSurface, wasmContext } = await SciChartSurface.create(element);
sciChartSurface.xAxes.add(new NumericAxis(wasmContext));
sciChartSurface.yAxes.add(new NumericAxis(wasmContext));
var heatMapData = zeroArray2D([1, 5]);
heatMapData[0][0] = 22.05; //should appear as color1 in heatmap
heatMapData[0][1] = 24.00; //...
heatMapData[0][2] = 30.00; //should appear as color2 in heatmap
heatMapData[0][3] = 26.75;
heatMapData[0][4] = 30.00; //should appear as color3 in heatmap
const heatmapDataSeries = new UniformHeatmapDataSeries(wasmContext, 0, 1, 0, 1, heatMapData);
const heatmapSeries = new UniformHeatmapRenderableSeries(wasmContext, {
dataSeries: heatmapDataSeries,
colorMap: new HeatmapColorMap({
minimum: 20, // min value in the zValues (data) to map to offset 0 in the colormap
maximum: 30, // max value in the zValues (data) to map to offset 1 in the colormap
gradientStops: [
{ offset: 0, color: "#00008B" },
{ offset: 0.3, color: "#7FFF00" },
{ offset: 0.7, color: "#FFFF00" },
{ offset: 1.0, color: "#FF0000" },
],
}),
});
sciChartSurface.renderableSeries.add(heatmapSeries);
}
But this only displays an empty grid. I don’t see a heatmap. Anyone can point out what may be wrong? Not even the axis is showing up correctly.
- Joel Roberts asked 2 years ago
- last active 4 months ago
I am considering applying server-side licensing for my javerScript application.
In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support.scichart.com/support/solutions/articles/101000515345-scichart-js-domain-licensing-faq)
However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)
I wonder if there is a sample code implemented in C++ for server-side licensing.
Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?
- brad leppert asked 1 year ago
- last active 1 month ago
I would like to create an arc annotation as shown in the attached image in Scichart JavaScript.
Please guide me on what will be the best way.
- Ramesh Sippy asked 2 years ago
- last active 2 years ago
I am using SciChartSurface.create() to create chart and it works well. However, I got the webGL memory issue randomly – WebGL memory issue. I am trying to apply a workaround to use SciChartSurface.createSinge() instead. The createSingle() function doesn’t work for me, the chart cannot be rendered.
const { sciChartSurface, wasmContext } = await SciChartSurface.createSinlge(`${chartId}-chart-root`, { theme: themeObj });
There is no error showing in the developer tool console. I have no idea what’s wrong.
- Quyen Sy asked 6 months ago
- last active 6 months ago
Hi,
we have recently bought Bundle licenses to be able to use SciChart JS. We are non-profit and make in-house web-applications.
I want to migrate to it asap but need urgent clarification on the licensing. There is only 1 domain allowed per developer. This seems strange to me because we run multiple micro-UIs under different domains. We also have dev & test environments. Do we need an extra license for all of these?
Please clarify. We are very happy with SciChart but this would be a major problem for us.
- Stephan Bertl asked 3 years ago
- last active 3 years ago
Do scichart supports microsoft blazor ?
If yes, Any examples available ?
- Abhilash R asked 3 years ago
- last active 2 years ago
I have a top chart that is a heatmap and there is another bottom chart that is a temperature map. I want the heatmap not show any y-axis labels but still keep the x-axis start aligned from the left side. I tried turning off the y-axis lables (which I do not need in the heatmap), but that moves the heatmap to the left and not kept aligned with the bottom chart.
const yAxis = new NumericAxis(wasmContext, {
autoRange: EAutoRange.Always,
labelFormat: ENumericFormat.Decimal,
labelPrecision: 2,
labelPostfix: "C",
drawLabels: false
});
The above code hides the y-axis labels but also removes the space on the left side so the x-axis of both graphs does not remained aligned. I need a way to somehow keep the start of x-axis aligned for both top and bottom graphs.
- Joel Roberts asked 2 years ago
- last active 2 years ago
I am considering applying server-side licensing for my javerScript application.
In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)
However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)
I wonder if there is a sample code implemented in C++ for server-side licensing.
Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?
- pramod butte asked 5 months ago
- last active 3 weeks ago
Hello,
I am having a problem where I want to display the Rollover Modifier only when I click on the selected graph.
For example:
https://demo.scichart.com/javascript-chart-rollovermodifier-tooltips
If I select the Second Lines Series, I want to see the rollover only for that particular graph and not the first one and the third one.
I have tried using charts id’s as a reference to show only one tooltip but it just enables it for all the graphs.
Any help would be kindly appreciated.
- Zino As asked 1 week ago
- last active 2 days ago
Screenshots attached.
To recreate:
- Create a chart
- Add a CursorModifier – default options is fine
- Either directly remove the modifier using .remove(modifier), or clear all using .clear()
Expected behaviour:
– Should remove the cursor modifier
Actual behaviour with bug:
– Crashes the page
This appears to be an issue with CursorModifier only (out of the 5 or 6 that I’ve tried). Other modifiers work as expected.
Traced the issue to this.parentSurface being undefined in CursorModifier.js, so when onDetach() is called, it errors.
Thanks!
Joe
- Henrique Rodrigues asked 3 years ago
- last active 3 years ago
Hello,
I have a Blazor WASM app running Scichart JS. In attempting to get any of the filters working listed in the Filters API docs I am unable to build my application and get thrown an error.
As listed in Moving Average Filter Docs I import the XyMovingAverageFilter:
import { XyMovingAverageFilter } from ‘scichart/Charting/Model/Filters/XyMovingAverageFilter’;
Run npm install and build the application and I get the error:
Module not found: Error: Can’t resolve ‘scichart/Charting/Model/Filters/XyMovingAverageFilter’ in …
So far I have not run into any issues getting any of the Scichart JS APIs working in this manner.
- Leland asked 2 years ago
- last active 2 years ago
I’m trying to add an AxisMarkerAnnotations for some line series on my chart.
I was following these questions answered here:
https://www.scichart.com/questions/js/adding-axis-markers-to-fastlinerenderableseries
https://www.scichart.com/questions/js/price-indicators-on-yaxis
I managed to render the axis marker for my series. Now I’m trying to the set the Y value of the marker annotation as the value where the line intersects the Y Axis.
I want the marker value to be the last value of the series, only if the xAxis.visibleRange.max > series.XdataRange.max.
The two attached images show the desired feature.
One shows the marker annotation with the Y1 being the one where the line intersects the YAxis.
The other shows the marker annotation with the Y1 being the last value of the line, because it is visible.
I read some answers here on the forum about using the HitTest API to do this, but I couldn’t make it work on my JS app
- Lucas Lucafó asked 8 months ago
- last active 8 months ago
Hello,
I am currently developing an application using Electron (v. 8.3.0), React (v. 17.0.1), and TypeScript (v. 4.0.5). I have created a simple demo app (see attached) to test this software, and I found that whenever the application window is resized, there is an “Uncaught null” error from scichart2d.js caught by the console. I also found that at some window dimensions, it even seems that the chart cannot properly be displayed and it will try to constantly rerender, quickly filling up the console with the same error.
A couple of notes:
- I currently am using a trial key.
- I am compiling this application using electron-webpack (https://webpack.electron.build/). It has a few built-in tools that ease the compilation/app creation process when combining Electron with other frameworks. This means some of the webpack API being used is abstracted, but we can append our own (see webpack.renderer.additions.js), more information can also be found at https://webpack.electron.build/modifying-webpack-configurations.
- Electron v. 8.3.0 uses Chromium 80, so all features should be supported.
- Drew Afshari asked 3 years ago
- last active 3 years ago
I see in the documentation that I need to set the boolean to true/false. But my question is how do I do this after the series has been rendered? I am using a custom legend and need to be able to toggle visibility.
export default function Chart() {
const [sciChartSurface, setSciChartSurface] = React.useState<SciChartSurface>();
const [wasmContext, setWasmContext] = React.useState<TSciChart>();
const dataSeriesMapRef = React.useRef<Map<keyof typeof chartData, XyDataSeries>>();
React.useEffect(() => {
(async () => {
const { sciChartSurface, wasmContext } = await drawChart(theme, chartType);
setSciChartSurface(sciChartSurface);
setWasmContext(wasmContext);
})();
dataSeriesMapRef.current = new Map<keyof typeof chartData, XyDataSeries>();
return () => sciChartSurface?.delete();
}, [chartType]); // make sure the chart is initialized only once
React.useEffect(() => {
if (dataSeriesMapRef.current && sciChartSurface && wasmContext && !isLoading) {
// const currentSeries = sciChartSurface.renderableSeries.asArray();
// if (currentSeries) sciChartSurface.renderableSeries.clear();
updateChartWithData(dataSeriesMapRef.current, theme, wasmContext, sciChartSurface, chartData, chartType);
}
}, [theme, chartData, wasmContext, sciChartSurface, isLoading]);
return (
<div id="chart-container">
<ControlsLegend
chartData={chartData}
dataSeriesMap={dataSeriesMapRef.current as Map<keyof typeof chartData, XyDataSeries>}
theme={theme}
sciChartSurface={sciChartSurface as SciChartSurface}
wasmContext={wasmContext as TSciChart}
/>
<div id={DIVID} style={{ width: windowWidth, height: windowHeight }} />
<ControlsBottom />
</div>
);
}
drawChart.js
export default async (theme: ExtendedTheme, chartType: string) => {
const { sciChartSurface, wasmContext } = await SciChartSurface.create(DIVID);
const isLightTheme = theme.palette.type === 'light';
console.log('createChart');
const xAxis = new NumericAxis(wasmContext);
const yAxis = new NumericAxis(wasmContext);
xAxis.labelProvider.formatLabel = (unixTimestamp: number) => {
return new Date(unixTimestamp * 1000).toLocaleDateString('en-us', {
month: 'short',
year: 'numeric',
day: 'numeric',
});
};
yAxis.labelProvider = new CustomLabelProvider();
sciChartSurface.yAxes.add(yAxis);
sciChartSurface.xAxes.add(xAxis);
if (chartType !== 'stack') sciChartSurface.chartModifiers.add(new RolloverModifier({ showRolloverLine: false }));
sciChartSurface.chartModifiers.add(new ZoomPanModifier());
sciChartSurface.chartModifiers.add(new ZoomExtentsModifier());
sciChartSurface.chartModifiers.add(new MouseWheelZoomModifier());
sciChartSurface.chartModifiers.add(new PinchZoomModifier());
const rubberBandXyZoomModifier = new RubberBandXyZoomModifier({
isAnimated: true,
animationDuration: 400,
easingFunction: easing.outExpo,
fill: '#FFFFFF33',
stroke: '#FFFFFF77',
strokeThickness: 1,
});
sciChartSurface.chartModifiers.add(rubberBandXyZoomModifier);
sciChartSurface.zoomExtents();
if (isLightTheme) sciChartSurface.applyTheme(new SciChartJSLightTheme());
else sciChartSurface.applyTheme(new SciChartJSDarkTheme());
return { sciChartSurface, wasmContext };
};
updateChartWithData.js
export const updateChartWithData = (
dataSeriesMap: Map<keyof typeof chartData, XyDataSeries>,
theme: ExtendedTheme,
wasmContext: TSciChart,
sciChartSurface: SciChartSurface,
chartData: ChartData,
chartType: string
) => {
sciChartSurface.invalidateElement();
const streamIds = Object.keys(chartData);
const isLightTheme = theme.palette.type === 'light';
if (isLightTheme) sciChartSurface.applyTheme(new SciChartJSLightTheme());
else sciChartSurface.applyTheme(new SciChartJSDarkTheme());
sciChartSurface.invalidateElement();
console.log('updateChartWithData');
console.log(chartData);
const stackedColumns: any[] = [];
streamIds.forEach((s) => {
const streamId = Number(s) as keyof ChartData;
const streamSelectorId = streamId as keyof typeof chartData;
if (dataSeriesMap.has(streamSelectorId)) {
const xyDataSeries = dataSeriesMap.get(streamSelectorId);
chartData[streamId].data.forEach((value) => {
xyDataSeries?.append(value.timestamp, value.value);
});
} else if (chartType === 'scatter') {
const lineSeries = LineChart(dataSeriesMap, theme, wasmContext, chartData, streamSelectorId, streamId);
sciChartSurface.renderableSeries.add(lineSeries);
sciChartSurface.zoomExtents();
} else if (chartType === 'bar') {
const lineSeries = BarChart(dataSeriesMap, theme, wasmContext, chartData, streamSelectorId, streamId);
sciChartSurface.renderableSeries.add(lineSeries);
sciChartSurface.zoomExtents();
} else {
const lineSeries = StackedChart(dataSeriesMap, theme, wasmContext, chartData, streamSelectorId, streamId);
stackedColumns.push(lineSeries);
}
});
};
“LineChart.js”
export default (
dataSeriesMap: Map<keyof typeof chartData, XyDataSeries>,
theme: ExtendedTheme,
wasmContext: TSciChart,
chartData: ChartData,
streamSelectorId: keyof typeof chartData,
streamId: keyof ChartData
) => {
const xyDataSeries = new XyDataSeries(wasmContext);
dataSeriesMap.set(streamSelectorId, xyDataSeries);
const obj = chartData[streamSelectorId];
const stroke = obj.stroke as string;
xyDataSeries.dataSeriesName = obj.label as string;
chartData[streamId].data.forEach((value) => {
xyDataSeries.append(value.timestamp, value.value);
});
const lineSeries = new FastLineRenderableSeries(wasmContext, {
stroke,
strokeThickness: obj.strokeThickness,
strokeDashArray: obj.strokeDashArray,
dataSeries: xyDataSeries,
animation: new WaveAnimation({ zeroLine: -1, pointDurationFraction: 0.5, duration: 1000 }),
});
lineSeries.rolloverModifierProps.tooltipColor = theme.palette.background.paper;
lineSeries.rolloverModifierProps.tooltipTextColor = theme.palette.getContrastText(stroke);
lineSeries.rolloverModifierProps.markerColor = stroke;
lineSeries.rolloverModifierProps.tooltipTemplate = (
id: string,
tooltipProps: RolloverModifierRenderableSeriesProps,
seriesInfo: SeriesInfo,
updateSize: (width: number, height: number) => void
) => {
const { tooltipColor, tooltipTextColor, markerColor } = tooltipProps;
const { formattedXValue, yValue, seriesName } = seriesInfo;
const width = 192;
const height = 60;
updateSize(width, height);
return `<svg width='${width}' height='${height}' class="root">
<rect width="100%" height="100%" fill='${tooltipColor}' stroke='${markerColor}' stroke-width='2' />
<svg width='100%'>
<text dy="0" fill='${tooltipTextColor}'>
<tspan x="15" y="20" class="title">${formattedXValue}</tspan>
<tspan x="15" y="45" class="value">
${seriesName} | ${yValue.toFixed(0).replace(/\B(?=(\d{3})+(?!\d))/g, ',')}
</tspan>
</text>
</svg>
</svg>`;
};
return lineSeries;
};
lengend.js
let _chartData: any[] = [];
export default ({
dataSeriesMap,
theme,
wasmContext,
sciChartSurface,
chartData,
}: {
dataSeriesMap: Map<keyof typeof chartData, XyDataSeries>;
theme: ExtendedTheme;
wasmContext: TSciChart;
sciChartSurface: SciChartSurface;
chartData: ChartData;
}) => {
const classes = useStyles();
const chartRef = React.useRef<any>([]);
const [legendData, setLegendData] = React.useState<any[]>([]);
// _chartData = [..._chartData, ...values(chartData)];
_chartData = values(chartData);
_chartData = uniqby(_chartData, 'groupId');
_chartData = uniqby(_chartData, 'streamId');
React.useEffect(() => {
if (_chartData.length > 0 && !isEqual(chartRef.current, _chartData)) {
setLegendData(_chartData);
chartRef.current = _chartData;
}
}, [_chartData]);
const onClick = React.useCallback(
(item) => {
// const xyDataSeries = dataSeriesMap.get(160);
const _legendData = legendData.map((x) => {
if (x.groupId === item.groupId) x.isVisible = !x.isVisible;
return x;
});
setLegendData(_legendData);
},
[legendData]
);
return (
<div className={classes.root}>
<Paper variant="outlined" square>
{legendData.map((item: any) => (
<div className={classes.listItem} key={item.streamId}>
<IconButton
onClick={() => onClick(item)}
style={{ color: item.stroke }}
size="small"
aria-label={item.label}
>
{item.isVisible ? <VisibilityIcon /> : <VisibilityOffIcon />}
</IconButton>
<div>{item.label}</div>
</div>
))}
</Paper>
</div>
);
};
Inside the onClick function is where I was trying to change visibility for both series. I’ve tried multiple things without any luck. I assumed it would be as simple as getting the correct series, setting the visible property and maybe a re-render if that is even needed? Like I said any advice on a better way of handling this is welcome
- Rodolfo Sanchez asked 3 years ago
- last active 3 years ago
I am having UX issues with overlapping Bars on BarChart with certain datasets. Example attached is the code
https://codesandbox.io/p/sandbox/javascript-column-chart-forked-p59p75?file=%2Fsrc%2FApp.tsx%3A49%2C1
please uncomment lines at 47 and 48 for a different set of x and y values where it works fine.
Not sure what am i doing wrong.
- vamsi pallem asked 2 months ago
- last active 2 months ago
Hi,
We use SciChart extensively in our WPF applications and make use of CustomRenderableSeries, writing all kinds of different lines and bitmaps directly to the IRenderContext2D depending on the point metadata.
We’re now looking at doing something similar in JavaScript, but can’t find any examples of this kind of customisation in the documentation. In the JavaScript library, is it possible to draw directly to a ‘canvas’ in the same way as in the WPF version? If so, could you please point to an example?
Many thanks,
Graham.
- Graham Stoneman asked 1 year ago
- last active 1 year ago
Hello,
I want to render a base64 image in ScichartJS without actually rendering it in DOM. I saw that you have these guides in WPF:
https://support.scichart.com/index.php?/Knowledgebase/Article/View/17213/34/
https://www.scichart.com/documentation/win/current/webframe.html#Screenshots,_Printing_and_Export_to_XPS.html
However it is difficult to achieve it in Typescript. Is there a guide or any ideas on how to do it? I would appreciate any answer.
- Zino As asked 9 months ago
- last active 9 months ago
Hello,
Can you show this example(https://codepen.io/PodaRocheK/pen/yLGxGEL?editors=0011) and tell me, why metadata labels are not displayed in some cases? May be you can tell me how to do it correctly? A have similar chart with a lot of datapoints and can’t understand why labels show only in some time(20s or > 1m after start the chart)
Thank you!
- Yevhenii Krasovskyi asked 6 months ago
- last active 6 months ago
Hello, I am running scichart in a blazorwasm app. On updating from 1.x to 2.2.2351 I am getting an uncaught error for a missing module on app startup before I make any calls to scichart to initialize.
The error is:
Uncaught Error: Cannot find module ‘../Charting/Model/Filters/HlcScaleOffsetFilter’
at webpackMissingModule (buildDataSeries.js:15:94)
at eval (buildDataSeries.js:15:215)
at Object../node_modules/scichart/Builder/buildDataSeries.js (strategyChart.js:133:1)
at webpack_require (strategyChart.js:21:30)
at eval (chartBuilder.js:45:25)
at Object../node_modules/scichart/Builder/chartBuilder.js (strategyChart.js:181:1)
at webpack_require (strategyChart.js:21:30)
at eval (SciChartSurface.js:30:22)
at Object../node_modules/scichart/Charting/Visuals/SciChartSurface.js (strategyChart.js:3253:1)
at webpack_require (strategyChart.js:21:30)
My webpack is:
const path = require("path");
const CopyPlugin = require("copy-webpack-plugin");
const webpack = require("webpack");
module.exports = {
mode: "development",
entry: {
strategyChart: './src/strategyChart.js'
},
module: {
rules: []
},
resolve: {
extensions: [".js"]
},
output: {
path: path.resolve(__dirname, '../wwwroot'),
filename: "[name].js",
library: "[name]"
},
plugins: [
new CopyPlugin({
patterns: [
{ from: "node_modules/scichart/_wasm/scichart2d.data", to: "" },
{ from: "node_modules/scichart/_wasm/scichart2d.wasm", to: "" }
]
}),
new webpack.IgnorePlugin(/(fs)/)
]
};
- Leland asked 2 years ago
- last active 2 years ago
I recently upgraded SciChart from version 2 to version 3.0.266. It was working fine. But I got error (please refer to the attached screenshot) when I try to run my application today. It’s so strange as it worked fine yesterday and I didn’t make any codes change today.
- Quyen Sy asked 1 year ago
- last active 1 year ago
I am trying to create a live updated non-uniform heatmap with uniform xStep but non-uniform yStep. But I got color mapping problem when I tried to create the non-uniform heatmap. The color showing in the chart doesn’t map with the ColorMap value. Below are my codes:
Draw the non-uniform heatmap:
const SPECTROGRAM_HEIGHT = 256;
const SPECTROGRAM_WIDTH = 100;
const { sciChartSurface, wasmContext } = await SciChartSurface.create("spectrogram-chart-root");
const xAxis = new NumericAxis(wasmContext, {
axisTitle: "Frequency",
axisTitleStyle: {
fontSize: CHART_STYLE.AXIS_FONT_SIZE,
fontFamily: "sans-serif",
fontWeight: "bold"
},
labelStyle: {
fontSize: CHART_STYLE.LABEL_FONT_SIZE,
fontFamily: "sans-serif"
},
labelFormat: ENumericFormat.Decimal,
labelPrecision: 6,
cursorLabelFormat: ENumericFormat.Decimal,
cursorLabelPrecision: 6,
drawMajorBands: false,
});
const yAxis = new NumericAxis(wasmContext, {
axisTitle: "Time",
axisTitleStyle: {
fontSize: CHART_STYLE.AXIS_FONT_SIZE,
fontFamily: "sans-serif",
fontWeight: "bold"
},
labelStyle: {
fontSize: CHART_STYLE.LABEL_FONT_SIZE,
fontFamily: "sans-serif"
},
drawMajorBands: false,
});
// Add XAxis and YAxis
sciChartSurface.xAxes.add(xAxis);
sciChartSurface.yAxes.add(yAxis);
const colorMap = new HeatmapColorMap({
minimum: -200,
maximum: -50,
gradientStops: [
{ offset: 1, color: COLORS.DARK_RED },
{ offset: 0.8, color: COLORS.RED },
{ offset: 0.6, color: COLORS.YELLOW },
{ offset: 0.5, color: COLORS.GREEN },
{ offset: 0.4, color: COLORS.BLUE },
{ offset: 0.01, color: COLORS.DARK_BLUE },
{ offset: 0, color: "Transparent" },
]
});
// Create a Heatmap Data-series. Pass heatValues as a number[][] to the UniformHeatmapDataSeries
zValues = Array.from(Array(SPECTROGRAM_HEIGHT), () => Array(SPECTROGRAM_WIDTH).fill(-200));
const heatmapSeries = new NonUniformHeatmapRenderableSeries(wasmContext, {
dataSeries: new NonUniformHeatmapDataSeries(wasmContext, { zValues: zValues, xCellOffsets: getHeatmapXOffset, yCellOffsets: getHeatmapYOffset }),
colorMap: colorMap,
useLinearTextureFiltering: true,
fillValuesOutOfRange: true,
});
// Add heatmap to the chart
sciChartSurface.renderableSeries.add(heatmapSeries);
I simply return the index for testing in the getHeatmapXOffset and getHeatmapYOffset functions:
const getHeatmapXOffset = (index) => {
return index;
};
const getHeatmapYOffset = (index) => {
return index;
};
I fill the zValues array with the minimum value -200, but the data displayed in the chart is COLORS.YELLOW. I don’t understand what’s wrong.
- Quyen Sy asked 12 months ago
- last active 12 months ago
Working on an application that requires toggling between Linear and Logarithmic scales. I am using the JavaScript version of the library, and I see that there is a LogarithmicNumericAxis available in the WPF version but there is not one currently supported in the JS version.
Curious if there were any recommendations on how to go about hand rolling this type of functionality?
The application is doing realtime streaming of data points so need to be able to update existing values as well as handle incoming values.
- James Miller asked 3 years ago
- last active 3 years ago
We found that when the entered data is wrong and SciChart exception occurs, we can’t get back to normal without F5 reloading.
In our application, when switching the symbol/screen, it will start over from SciChartSurface.create(), but it just cannot return to normal.
If the abnormal data causes scichart exception, what can we do to minimize the damage ?
Here is demo video :
https://youtu.be/N066BHB83Ik
- chinghung lai asked 2 years ago
- last active 2 years ago
Tell me, please, how best to organize the graph in the case when on the time axis we can have more than 100-1000 records within 1 second. The problem seems to be that the X value must be accurate to at least 1 second? How to make records with even greater accuracy. and at the same time the time on the axis was shown correctly for this kind of data?
- Yevhenii Krasovskyi asked 10 months ago
- last active 10 months ago
Hi
I am trying out JS SciChart based on the Blazor example you have posted more than a year ago.
I cannot get the auto scaling to work by code (the default behavior does auto scale once right after adding the data). Calling sciChartSurface.zoomExtents(); (or zoomExtentsX() and zoomExtentsY() after one another) does zoom into a very details portion of the graph.
Also (maybe related) the tooltip does not update when moving the cursor around, it always keeps the same data. I tried using CursorModifier as well as RolloverModifier, both having the same problem.
Attached the JS code and the c# files and a picture how this looks like after calling the autoScale() method.
Thanks for any help
Regards
Reto
- Reto Stahel asked 2 years ago
- last active 2 years ago
I have a bunch of series (XyScatterSeries) that I am using to draw different markers (triangle, circle, cross) based on the data. I also have couple line series too in the chart.
The line series should be displayed in the LegendModifier, but not any of the scatter series.
I tried setting “includeSeries” function here but that didn’t work (typescript kept complaining about it but I kept it and while running the app it didn’t hide the series):
return new LegendModifier({
showCheckboxes: true,
orientation: ELegendOrientation.Vertical,
placement: ELegendPlacement.TopRight,
includeSeries: (series: IRenderableSeries, isIncluded: boolean): void => { return false; },
});
Then I created my own class “MyLegendModifier” deriving from LegendModifier, but that didn’t do anything either.
class MyLegendModifier extends LegendModifier {
constructor(options?: ILegendModifierOptions) {
super(options);
}
includeSeries(series: IRenderableSeries, isIncluded: boolean) {
console.log('includeSeries:', series.id);
if (series.id.startsWith('BUY:') || series.id.startsWith('SELL:')) {
isIncluded = false;
}
super.includeSeries(series, isIncluded);
}
}
Any advise please.
- sachin patel asked 2 years ago
- last active 2 years ago
Hello, I’d like to know how is possible to draw Axis Bands from one data point to another.
I’m currently creating real-time stock charts and I need to display the after-hours with a different band.
Thanks in advanced for your help,
- Eliezer Veras asked 2 years ago
- last active 2 years ago
I tried to add a cursorModifier and then modify the stroke color later. But the color changes don’t work. Anything wrong with my codes?
Add cursorModified:
let cursorModifier = new CursorModifier({
crosshairStroke: #fff,
crosshairStrokeThickness: 1,
showTooltip: true,
showAxisLabels: false,
tooltipContainerBackground: "transparent",
tooltipTextStroke: #fff,
});
sciChartSurfaceRef.chartModifiers.add(cursorModifier);
Change the stroke color:
let cursorModifier = sciChartSurfaceRef.chartModifiers.get(0);
if (cursorModifier) {
cursorModifier.crosshairStroke = #333;
cursorModifier.tooltipTextStroke = #333;
}
- Kelly Chan asked 1 year ago
- last active 1 year ago
I updated schichart to the very last version and turn on the memory usage debug mode to see if there are any memory leaks in our application and ran into the following problem.
When MemoryUsageHelper.isMemoryUsageDebugEnabled = true;
and sciChartSurface has the following modifiers(RolloverModifier, CursorModifier) when moving the mouse over the chart I have the following console warnings.
From RolloverModifier instance
From CursorModifier instance
The message below is written on your docs about debugging, so I gues this is the case with the chart modifiers console warnings.
Usually this boils down to failing to call SciChartSurface.delete()
(or series.delete()
, annotation.delete()
when adding/removing objects) or plain JavaScript memory leaks where references to SciChart are held in the customer application & not garbage collected by the browser.
Steps To Reproduce
- Follow the codesandbox example by the link https://codesandbox.io/s/ts-band-chart-xwlxcm?file=/src/App.tsx;
- Once the chart is loaded and rendered, try moving the mouse cursor over the chart;
- Open the browser console ⇒ You will see the warnings I wrote about above.
The current behavior
Moving the mouse over the chart causes warning logs to appear in the browser console and possibly memory leaks.
The expected behavior
No warning logs while moving the mouse over the chart.
- Sergey Chernyakov asked 8 months ago
- last active 8 months ago
Hi,
Is it possible to toggle the DataLabels dynamically in the chart? Setting some values to true or false like isVisible property.
- Mathew George asked 7 months ago
- last active 7 months ago
Remove the white spaces on the chart when we using drawLabels: false. I am using multiple x-axes and no of x-axis increase the empty white space on the x-axis is also increasing.
- Jerin Mathew asked 3 years ago
- last active 3 years ago
Hello,
Is it possible to access the native canvas context to draw on the javascript chart surface? like for example, draw a circle or arc using HTML5 canvas apis.
-jackson
- mason jackson asked 2 years ago
- last active 2 years ago
I have a chart with default majorDelta 10 for y-axis. Users are allowed to change the scale (majorDelta) of the chart. When it’s changed to 0.1, the y-axis labels are gone. The y-axis labels can still be seen when the majorDelta is 0.2. Please check my screenshots for details.
- Quyen Sy asked 12 months ago
- last active 12 months ago
Hi!
I have chart with mountain series with a palette provider.
It performs extremely well with 50k points.
However, I noticed that when I drag the chart away, to a point where the series is not visible, the performance sinks and the chart is extremely laggy.
I have uploaded my code to codepen: https://codepen.io/robrob123/pen/KKJjyvp
I checked the performance using the chrome performance profiler and I found that a function called applyStrokeFillPalletting is called repeatedly many times and each time it takes way too long to execute, considering there is no series to draw.
I have attached a screenshot showing the performance profiling.
Thank you!
- Roger Cooper asked 4 months ago
- last active 4 months ago
Multiple instances of sci chart any appearance changes reflecting on other instances. When I changed the background of one instance the same is reflected in the other instance. I have updated with createSingle to resolve this issue, But i am getting one alert when using createSingle.
- Arun Surendran asked 3 years ago
- last active 3 years ago
Hello!
Tell me what I’m doing wrong?
Here’s the code
import { NumericAxis } from "scichart/Charting/Visuals/Axis/NumericAxis";
import { FastLineRenderableSeries } from "scichart/Charting/Visuals/RenderableSeries/FastLineRenderableSeries";
import { EllipsePointMarker } from "scichart/Charting/Visuals/PointMarkers/EllipsePointMarker";
import { RolloverModifier, TRolloverTooltipDataTemplate } from "scichart/Charting/ChartModifiers/RolloverModifier";
import { ZoomPanModifier } from "scichart/Charting/ChartModifiers/ZoomPanModifier";
import { ZoomExtentsModifier } from "scichart/Charting/ChartModifiers/ZoomExtentsModifier";
import { MouseWheelZoomModifier } from "scichart/Charting/ChartModifiers/MouseWheelZoomModifier";
import { SciChartSurface } from "scichart";
import { parseColorToUIntArgb } from "scichart/utils/parseColor";
import { XyDataSeries } from "scichart/Charting/Model/XyDataSeries";
import { CategoryAxis } from "scichart/Charting/Visuals/Axis/CategoryAxis";
import { TextLabelProvider } from "scichart/Charting/Visuals/Axis/LabelProvider/TextLabelProvider";
import { Thickness } from "scichart/Core/Thickness";
import { ELabelAlignment } from "scichart/types/LabelAlignment";
const dataData=[
"2022-10-22 00:09:41",
"2022-10-22 00:19:37",
"2022-10-22 00:29:16",
"2022-10-22 00:38:51",
"2022-10-22 00:49:49",
"2022-10-22 00:59:37",
"2022-10-22 01:09:25",
"2022-10-22 01:19:26",
"2022-10-22 01:28:35",
"2022-10-22 01:38:47",
"2022-10-22 01:48:29",
"2022-10-22 01:58:30",
"2022-10-22 02:09:11",
"2022-10-22 02:18:45",
"2022-10-22 02:28:41",
"2022-10-22 02:38:38",
"2022-10-22 02:48:53",
"2022-10-22 02:59:39",
"2022-10-22 03:08:51",
"2022-10-22 03:19:00",
"2022-10-22 03:28:30",
"2022-10-22 03:38:51",
"2022-10-22 03:49:01",
"2022-10-22 03:58:35",
"2022-10-22 04:08:47",
"2022-10-22 04:19:11",
"2022-10-22 04:29:05",
"2022-10-22 04:38:39",
"2022-10-22 04:48:46",
"2022-10-22 04:58:57",
"2022-10-22 05:08:22",
"2022-10-22 05:18:30",
"2022-10-22 05:29:09",
"2022-10-22 05:38:56",
"2022-10-22 05:48:35",
"2022-10-22 05:58:34",
"2022-10-22 06:08:26",
"2022-10-22 06:18:58",
"2022-10-22 06:28:33",
"2022-10-22 06:38:56",
"2022-10-22 06:48:42",
"2022-10-22 06:58:55",
"2022-10-22 07:08:59",
"2022-10-22 07:19:03",
"2022-10-22 07:28:28",
"2022-10-22 07:38:18",
"2022-10-22 07:48:35",
"2022-10-22 07:58:18",
"2022-10-22 08:08:22",
"2022-10-22 08:18:43",
"2022-10-22 08:29:01",
"2022-10-22 08:38:59",
"2022-10-22 08:49:16",
"2022-10-22 08:59:13",
"2022-10-22 09:09:24",
"2022-10-22 09:18:36",
"2022-10-22 09:28:56",
"2022-10-22 09:39:13",
"2022-10-22 09:48:35",
"2022-10-22 09:59:14",
"2022-10-22 10:09:18",
"2022-10-22 10:19:04",
"2022-10-22 10:29:34",
"2022-10-22 10:39:14",
"2022-10-22 10:48:53",
"2022-10-22 10:58:40",
"2022-10-22 11:08:58",
"2022-10-22 11:18:47",
"2022-10-22 11:28:39",
"2022-10-22 11:39:13",
"2022-10-22 11:49:00",
"2022-10-22 11:59:13",
"2022-10-22 14:20:05",
"2022-10-22 14:29:37",
"2022-10-22 14:39:49",
"2022-10-22 14:49:41",
"2022-10-22 15:00:10",
"2022-10-22 15:09:27",
"2022-10-22 15:19:49",
"2022-10-22 15:29:41",
"2022-10-22 15:39:16",
"2022-10-22 15:49:48",
"2022-10-22 15:59:52",
"2022-10-22 16:09:29",
"2022-10-22 16:19:48",
"2022-10-22 16:29:40",
"2022-10-22 16:39:20",
"2022-10-22 16:49:57",
"2022-10-22 16:59:11",
"2022-10-22 17:09:37",
"2022-10-22 17:19:00",
"2022-10-22 17:29:21",
"2022-10-22 17:39:52",
"2022-10-22 17:49:44",
"2022-10-22 17:59:50",
"2022-10-22 18:09:38",
"2022-10-22 18:19:24",
"2022-10-22 18:29:13",
"2022-10-22 18:39:05",
"2022-10-22 18:49:09",
"2022-10-22 18:59:13",
"2022-10-22 19:09:17",
"2022-10-22 19:19:06",
"2022-10-22 19:29:37",
"2022-10-22 19:40:11",
"2022-10-22 19:49:33",
"2022-10-22 19:59:14",
"2022-10-22 20:09:07",
"2022-10-22 20:20:02",
"2022-10-22 20:29:19",
"2022-10-22 20:39:13",
"2022-10-22 20:49:43",
"2022-10-22 20:59:28",
"2022-10-22 21:08:59",
"2022-10-22 21:19:03",
"2022-10-22 21:29:14",
"2022-10-22 21:39:19",
"2022-10-22 21:49:40",
"2022-10-22 21:59:04",
"2022-10-22 22:09:33",
"2022-10-22 22:20:00",
"2022-10-22 22:30:25",
"2022-10-22 22:39:43",
"2022-10-22 22:49:13",
"2022-10-22 22:58:58",
"2022-10-22 23:09:05",
"2022-10-22 23:19:12",
"2022-10-22 23:29:49",
"2022-10-22 23:38:55",
"2022-10-22 23:49:41",
"2022-10-22 23:59:32",
"2022-10-23 00:08:34",
"2022-10-23 00:18:43",
"2022-10-23 00:29:20",
"2022-10-23 00:39:13",
"2022-10-23 00:48:30",
"2022-10-23 00:59:44",
"2022-10-23 01:08:49",
"2022-10-23 01:19:00",
"2022-10-23 01:29:22",
"2022-10-23 01:39:06",
"2022-10-23 01:49:08",
"2022-10-23 01:59:19",
"2022-10-23 02:09:28",
"2022-10-23 02:18:57",
"2022-10-23 02:28:53",
"2022-10-23 02:38:44",
"2022-10-23 02:49:12",
"2022-10-23 02:58:41",
"2022-10-23 03:09:04",
"2022-10-23 03:19:28",
"2022-10-23 03:29:23",
"2022-10-23 03:38:38",
"2022-10-23 03:49:00",
"2022-10-23 03:59:16",
"2022-10-23 04:09:13",
"2022-10-23 04:18:54",
"2022-10-23 04:29:43",
"2022-10-23 04:39:27",
"2022-10-23 04:49:12",
"2022-10-23 04:59:07",
"2022-10-23 05:09:04",
"2022-10-23 05:18:50",
"2022-10-23 05:29:20",
"2022-10-23 05:39:06",
"2022-10-23 05:49:17",
"2022-10-23 05:58:48",
"2022-10-23 06:08:46",
"2022-10-23 06:18:36",
"2022-10-23 06:29:15",
"2022-10-23 06:38:57",
"2022-10-23 06:49:23",
"2022-10-23 06:58:55",
"2022-10-23 07:09:06",
"2022-10-23 07:19:01",
"2022-10-23 07:29:09",
"2022-10-23 07:39:10",
"2022-10-23 07:49:06",
"2022-10-23 07:59:06",
"2022-10-23 08:09:07",
"2022-10-23 08:19:23",
"2022-10-24 14:19:20",
"2022-10-24 14:30:23",
"2022-10-25 11:10:12",
"2022-10-25 11:20:56",
"2022-10-28 19:19:35",
"2022-10-28 19:30:53",
"2022-10-28 19:49:34"
]
const divElementId = "scichart-root"
class MyMetadata {
static create(title, previousValue, isSelected) {
const md = new MyMetadata()
md.title = title
md.previousValue = previousValue ?? md.previousValue
md.isSelected = isSelected ?? md.isSelected
return md
}
isSelected = false
palettedStrokeRed = parseColorToUIntArgb("red")
palettedStrokeGreen = parseColorToUIntArgb("green")
constructor() {}
}
const tooltipDataTemplateRS = seriesInfo => {
const valuesWithLabels = []
// Line Series
const xySeriesInfo = seriesInfo
if (seriesInfo.pointMetadata) {
const testMd = seriesInfo.pointMetadata
valuesWithLabels.push(
testMd.title + " Previous: " + testMd.previousValue.toFixed(1)
)
}
valuesWithLabels.push(
"X: " + xySeriesInfo.formattedXValue + " Y: " + xySeriesInfo.formattedYValue
)
return valuesWithLabels
}
const color = "#368BC1"
const drawExample = async () => {
const { sciChartSurface, wasmContext } = await SciChartSurface.create(
divElementId
)
const xAxis = new CategoryAxis(wasmContext);
const labelProvider = new TextLabelProvider({
// When passed as an array, labels will be used in order
labels: dataData,
maxLength: 188
});
xAxis.labelProvider = labelProvider;
xAxis.labelStyle.alignment = ELabelAlignment.Center;
xAxis.labelStyle.padding = new Thickness(2,1,2,1);
xAxis.axisRenderer.hideOverlappingLabels = false;
xAxis.axisRenderer.keepLabelsWithinAxis = false;
sciChartSurface.xAxes.add(xAxis)
const yAxis = new NumericAxis(wasmContext)
sciChartSurface.yAxes.add(yAxis)
for (let seriesIndex = 0; seriesIndex < 5; seriesIndex++) {
const firstSeriesData = createDataSeries(wasmContext, seriesIndex, {
dataSeriesName: "Sinewave"+seriesIndex
})
const renderableSeries1 = new FastLineRenderableSeries(wasmContext, {
stroke: color,
strokeThickness: 3,
dataSeries: firstSeriesData,
pointMarker: new EllipsePointMarker(wasmContext, {
width: 5,
height: 5,
strokeThickness: 2,
fill: "white",
stroke: color
})
})
renderableSeries1.rolloverModifierProps.markerColor = color
renderableSeries1.rolloverModifierProps.tooltipColor = color
sciChartSurface.renderableSeries.add(renderableSeries1)
renderableSeries1.rolloverModifierProps.tooltipDataTemplate = tooltipDataTemplateRS
}
sciChartSurface.chartModifiers.add(new RolloverModifier())
sciChartSurface.chartModifiers.add(new ZoomPanModifier())
sciChartSurface.chartModifiers.add(new ZoomExtentsModifier())
sciChartSurface.chartModifiers.add(new MouseWheelZoomModifier())
sciChartSurface.zoomExtents()
return { sciChartSurface, wasmContext }
}
// Generate some data, including metadata
const createDataSeries = (wasmContext, index, options) => {
const sigma = Math.pow(0.6, index)
const dataSeries = new XyDataSeries(wasmContext, options)
let prev = 0
for (let i = 0; i < 188; i++) {
const grow = 1 + i / 99
const metadata =i > 0 ? MyMetadata.create("Metadata " + i.toString(), prev) : undefined
const y = Math.sin((Math.PI * i) / 15) * grow * sigma
// metadata is an optional parameter on all data manipulation methods on dataseries,
// so it can also be added as an array eg dataSeries.appendRange(xValues, yValues, metadataArray);
dataSeries.append(i+1, y, metadata)
prev = y
}
return dataSeries
}
drawExample()
- js scichart asked 1 year ago
- last active 1 year ago