Pre loader

Forums

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

3 votes
4k views

Hi,

In my application I am using two charts for represent different values. I am using LegendModifier on the first chart. Is it possible when i uncheck the series on first chart and the same color series on second chart also need to hide from the second chart. Any event callback function available in LegendModifier ?

1 vote
3k views

Hi Scichart Team,
RenderableSeries Hit-Test still having some issues. I saw that the bug on your board is already closed state and my last comments are missed on the bug. So i am adding the same here.

https://www.scichart.com/questions/js/renderableseries-hit-test-not-working-as-expected

Can you please check the video and the code. Only change i have done on the Example is the data values are updated. On the video you can saw the clicking outside for some area Hit is showing, some area miss is showing, and clicking on the lines or point also showing the same. Let me know you need any more inputs from my side.

1 vote
5k views

I am working on a proof of concept for our company to move some of our desktop apps to the web. We use SciChart WPF in our desktop apps so we are going with SciChart.JS for the web apps. Is it possible to stack the FastLineRenderableSeries in SciChart.JS like we do in WPF?

Edit: Found the answer just after I posted this question.

sciChartSurface.layoutManager.leftOuterAxesLayoutStrategy = new LeftAlignedOuterVerticallyStackedAxisLayoutStrategy();

Screenshot of WPF Chart

1 vote
2k views

Hi,

I would like to display the rollovermodifier line that must be parallel to the X axis and the Rollovermodifier line must be a dashed line. In the y axis I need to add a label annotation with svg .How can I fix the problem. Kindly provide me the solution.

This is the code I have given,

const horizontalline = new RolloverModifier({
IsEnabled: true,
DrawVerticalLine: true,
showTooltip: false,
rolloverLineStroke: “white”,
rolloverLineStrokeThickness : 1
})
sciChartSurface.chartModifiers.add(horizontalline);

  • Ayana VS asked 2 years ago
  • last active 2 years ago
1 vote
5k views

Hi,

Im working with Scichart JS on a React project and trying to write some tests using Jest.
I managed to start a browser environment with webgl support to run the tests, but I’m having a hard time to provide the .data and .wasm files to this environment.

This is what i’m trying to run:

import {SciChartSurface} from 'scichart/Charting/Visuals/SciChartSurface';

const buildSurface = async () => {
    const {sciChartSurface} = await SciChartSurface.create('test-surface', {
        viewportBorder: {border: 1}
    });
    return {sciChartSurface};
};

it('should build a surface', async () => {
    document.body.innerHTML = `<div id="test-surface"></div>`;
    const response = await buildSurface();
    const {sciChartSurface} = response;
});

and I’m getting lots of warns an errors like:

console.warn    both async and sync fetching of the wasm failed
console.error    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
console.error   Error: Uncaught [Error: NetworkError for: scichart2d.data]
thrown: "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"

Does anyone know how to setup a sufficient environment on jest to successfully build a scichart surface?

1 vote
2k views

I have a chart with a box annotation. When I try to resize the box annotation by dragging the left or right border, I got the “Uncaught TypeError: Cannot read properties of undefined (reading ‘x’)”. It’s not always reproducible and cannot be reproduced by dragging the whole box. Also, it only occurs with SciChart version 3 but not SciChart version 2. Please check the screenshots for more details.

  • Quyen Sy asked 1 year ago
  • last active 1 year ago
1 vote
2k views

Hello,

When annotations and the rollover modifiers are displayed on the very left side of a chart they align with the center of the candlesticks on the chart. However, as they get displayed toward the right side of the chart they get more and more offset to the right side of the candlestick.

Can anyone point me in the right direction to figure out how to fix this issue seemingly with my xAxis?

See attached screenshots,

  • Leland asked 11 months ago
  • last active 11 months ago
1 vote
2k views

Hi,

I’m trying to render a mountain series with different colors in specific ranges.
I understand that this could be done using the palette provider.

I have done that, but the chart is behaving in a very strange way.

When dividing the chart to 2 color parts, when panning and scrolling it to a point that some of the points are out of window, the coloring starts to go crazy.

I have attached a few images that show the problem, and have also attached a file with the source code.
I have tested this on chrome version 116

Here’s the code

import {FastMountainRenderableSeries, XyDataSeries,ZoomPanModifier,EXyDirection,MouseWheelZoomModifier,NumericAxis,SciChartJSLightTheme, SciChartSurface, parseColorToUIntArgb, DefaultPaletteProvider, EStrokePaletteMode} from 'scichart'

SciChartSurface.UseCommunityLicense();
SciChartSurface.useWasmFromCDN();

class PaletteProvider extends DefaultPaletteProvider {
  constructor() {
    super();
    this.strokePaletteMode = EStrokePaletteMode.SOLID;
  }

  overrideStrokeArgb(xvalue) {    
    return xvalue > 200 ? parseColorToUIntArgb('#ff0000') : undefined
  }

  overrideFillArgb(xvalue) { 
    return xvalue > 200 ? parseColorToUIntArgb('#ff0000') : undefined
  }
}

const init = async () => {
  const {wasmContext, sciChartSurface} = await SciChartSurface.create('container', {theme: new SciChartJSLightTheme()})

  const xAxis = new NumericAxis(wasmContext);
  const yAxis = new NumericAxis(wasmContext);

  sciChartSurface.xAxes.add(xAxis)
  sciChartSurface.yAxes.add(yAxis)

  sciChartSurface.chartModifiers.add(new MouseWheelZoomModifier({xyDirection: EXyDirection.XDirection}))
  sciChartSurface.chartModifiers.add(new ZoomPanModifier({xyDirection: EXyDirection.XDirection}))

  const array = new Array(500).fill(0).map(val => Math.max(Math.random(), 0));
  const array2 = new Array(500).fill(0).map((val, index) => index);

  const dataSeries = new XyDataSeries(wasmContext)
  dataSeries.appendRange(array2, array);

  const series = new FastMountainRenderableSeries(wasmContext, {
    stroke: 'blue',
    fill: 'blue',
    strokeThickness: 3,
    zeroLineY: 0,
    dataSeries,
    paletteProvider: new PaletteProvider()
  })

  sciChartSurface.renderableSeries.add(series);
}

init();

Thanks for the help!

  • haba haba asked 8 months ago
  • last active 8 months ago
1 vote
2k views

Hello,

I found an issue with very high memory usage by the application. after some tests I found the problem and moved it to a separate example(https://codepen.io/PodaRocheK/pen/PoVmzvP?editors=0011). Please check this code and observe the memory usage on this page. With prolonged use (after 10 minutes), it is clear that more and more memory is used. After hours, the memory used may already be more than several gigabytes. Tell me what the problem is, maybe I’m doing something wrong. Maybe I’m somehow storing old data incorrectly or adding it incorrectly.

This example is not a working example, it has been sped up in order to quickly identify the problem. In our example, an unnecessary data update will occur once every few seconds and after a night of inactivity, the entire page will die. Please tell me what the problem is.

Thank you!

1 vote
1k views

I am trying to change the format of CursorModifier

sciChartSurface.chartModifiers.add(
  new CursorModifier({
    modifierGroup: 'Chart',
    showAxisLabels: true,
    showTooltip: false,
    showYLine: false,
    showXLine: true,
  })
);

I have a custom DateLabelProvider for the xAxis that return dates in this format ‘MM/dd HH:mm’ but the CursorModifier tooltip is showing the ‘MM/dd/YYYY’ format, how can I change it?

1 vote
11k views

Hi,

In past versions of SciChart JS I was able to run a webpack-built set of static files on an Nginx-based Docker container without issues.

I’m now seeing the error “memory access out of bounds” (screenshot attached) when doing this, and as a result does not render the charts at all, whether it’s running locally or hosted on AWS. This happens in both Chrome and Firefox.

It runs absolutely fine using webpack dev server.

The error seems to be coming from scichart2d.wasm. Any ideas?

Thanks
Joe

1 vote
12k views

Hi, I want to color the axis label by its value,

eg.
value < 0 -> show red color
value = 0 -> show gray color
value > 0 -> show green color

similar to this question, but in javascript platform, it seems the LabelProvider has function related to the value(string) formatting only. Is there any ways to styling the label? Thanks!

1 vote
2k views

Hello I am using the following unixtimestamp format for the x axis and it renders some random numbers instead of treating them as dates. What is the correct format? please see attached screenshot.

export const dateValues: number[] = [
    1546300800000,
    1546304400000,
    1546308000000,
    1546311600000,
    1546315200000,
    1546318800000,
    1546322400000,
    1546326000000,
    1546329600000,
    1546333200000,
    1546336800000,
    1546340400000,
    1546344000000,
    1546347600000,
    1546351200000,
    1546354800000,
    1546358400000,
    1546362000000,
    1546365600000,
    1546369200000,
    1546372800000,
    1546376400000, ]

Here’s the code for creating the chart

  // Create a SciChartSurface
  const { sciChartSurface, wasmContext } = await SciChartSurface.create(
    "scichart-root"
  ); 

  sciChartSurface.xAxes.add(
        new CategoryAxis(wasmContext, {
          labelProvider: new SmartDateLabelProvider(),
          defaultXStep: 1546304400000 - 1546300800000,
          //growBy: new NumberRange(0.05, 0.05),
          drawMajorGridLines: true,
          drawMinorGridLines: true,
          axisAlignment: EAxisAlignment.Bottom,
          autoRange: EAutoRange.Once,
          drawMajorBands: false,
        })
      );
1 vote
4k views

I have a real time updated chart with very large data size and I am facing the slow client problem. i.e. The data sending speed is faster than the data receiving and handling speed which causes memory growing up issue. I am trying to use Web Workers to increase the data handling speed in frontend. I have found a related post:

https://www.scichart.com/questions/wpf/is-xydataseries-safe-to-being-changed-in-a-separate-thread

It seems possible to update XyDataSeries in the background thread with WPF. My UI is built with NextJS. I tried to use Web Workers to implement multiple threads. But I found that it can’t pass the SciChartSurface or XyDataSeries to the worker thread. Could you show me an example on how to update XyDataSeries in the worker thread with Web Workers?

  • Quyen Sy asked 1 year ago
  • last active 1 year ago
1 vote
5k views

It seems to me that DateTimeNumericAxis has edge cases where it can’t calculate deltas for some ranges.
This results in a console error, and the chart not loading:

Error from chart in div date-axis-bug RangeError: Maximum call stack size exceeded
at get minTicks [as minTicks] (index.min.js:1:577149)
at a (index.min.js:1:577393)
at a (index.min.js:1:577567)
at a (index.min.js:1:577483)
at a (index.min.js:1:577567)
at a (index.min.js:1:577483)
at a (index.min.js:1:577567)
at a (index.min.js:1:577483)
at a (index.min.js:1:577567)
at a (index.min.js:1:577483)

Provided codepen: https://codepen.io/jrfv/pen/xxQawom

Any suggestions?
Thanks!

1 vote
4k views

Hi,

DataLabels Not Displaying in all cases in flippedCoordinates. Based on values only its showing. I have created a sample application with some dummy data.

  1. First Series is showing the labels properly
  2. If the first value in array changed then it will show the value.
  3. If all values are 0 then also its not showing the label.

Can you check the attached file for the sample code.

When the chart is not flipped then its works fine when i am checking.

1 vote
1k views

TextAnnotation,Let me use this method, I want to make all the text in the text attribute display vertically, and find that there is no such function, NativeTextAnnotation has this function but does not support Chinese.I hope you can see that you can give a reply, thank you![enter image description here][1]

1 vote
6k views
  1. SciChartSurface created with category x and numeric y axes
  2. ZoomPanModifier, ZoomExtentsModifier, MouseWheelZoomModifier, RolloverModifier added.
  3. Any series and dataSeries are initialized and added to the surface, but not filled with values yet.
  4. Value streaming started with delay.

The first error occurs when trying to zoom on empty surface :

Uncaught TypeError: Cannot read properties of undefined (reading 'width')
at MouseWheelZoomModifier2.ChartModifierBase2D2.growBy (ChartModifierBase2D.js:121:48)

And the other one when trying to drag:

Uncaught Error: category x axis with id=DefaultAxisId should have data series count > 0
at CategoryAxis2.CategoryAxisBase2.getCurrentCoordinateCalculatorInternal (CategoryAxisBase.js:95:19)

I have seen errors similar to the second one in other scenarios and sometimes it is fatal.
E.g i have tried to add annotation right after first value was added and first line raised similar error:

    const xCalc = this.surface.xAxes.get(0).getCurrentCoordinateCalculator() as CategoryCoordinateCalculator;
    const realX = xCalc.transformDataToIndex(time);
    const target = this.getOrAddAnnotation();
    target.x1 = realX;
    target.y1 = value;

Also getCurrentCoordinateCalculatorInternal error occurs when empty series & seriesData added without suspend.
I would appreciate any help and clarification

1 vote
3k views

Hi,

I am facing a issue with RolloverModifier. I have multiple charts in single window. For some points the lines over the chart are missing.

Please find the attached images for some examples and the code for reproduce the issue. on the attachment you can see that the line on some chart is missing when mouse on left and right corner area of the chart.

Posting again because on latest version also the same issue not resolved.
https://www.scichart.com/questions/js/rollovermodifier-in-multiple-chart-line-missing-on-some-areas

1 vote
2k views

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()
1 vote
6k views

We are having the first experiences with SCIchart. Could someone help with this problem we are experiencing?

[ encore ] ERROR Failed to compile with 1 errors14:42:33 [ encore ]
Module build failed: Module not found: [ encore ]
“./node_modules/scichart/_wasm/scichart2d.wasm” contains a reference
to the file “a”. This file can not be found, please check it for typos
or update it if the file got moved. [ encore ] ERROR in
./resources/js/Pages/Home.vue?vue&type=template&id=6a63e488&scoped=true&ts=true
(./node_modules/unplugin/dist/webpack/loaders/transform.js?unpluginName=unplugin-vue-components!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/Pages/Home.vue?vue&type=template&id=6a63e488&scoped=true&ts=true)
10:27 Module parse failed: Unexpected token (10:27) File was processed
with these loaders: *
./node_modules/unplugin/dist/webpack/loaders/transform.js *
./node_modules/unplugin/dist/webpack/loaders/transform.js *
./node_modules/vue-loader/dist/templateLoader.js *
./node_modules/vue-loader/dist/index.js You may need an additional
loader to handle the result of these loaders. | }, null, -1 /* HOISTED
*/)) |

export function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) { | return (_openBlock(),
_createElementBlock(“div”, _hoisted_1, [ | _createElementVNode(“h1”, null, _toDisplayString(_ctx.msg), 1 /* TEXT */),

ERROR in ./node_modules/scichart/_wasm/scichart2d.wasm Module not
found: Error: Can’t resolve ‘a’ in
‘C:\Users\clo\fr\Projeto\chart\App\node_modules\scichart_wasm’

ERROR in ./node_modules/scichart/_wasm/scichart3d.wasm Module not
found: Error: Can’t resolve ‘a’ in
‘C:\Users\clo\fr\Projeto\chart\App\node_modules\scichart_wasm’

webpack compiled with 3 errors

1 vote
2k views

I used NPM to complete the deployment and development validation of SCICHART JS, and I completed the demo as follows:

At present, I have two unresolved issues that we will make a purchase decision after they are resolved:
1、How to set the sampling rate for chart?
Using the wpf control, the sampling rate can be set through the “FifoCapacity” property of XyDataSeries, but I did not find this property in the JS control.

2、How to hide the preview of the SciChartOverview control?

       I don't want to display the data of the bound chart
  • max tu asked 12 months ago
  • last active 12 months ago
1 vote
5k views

I’m trying to add a axis label/marker to the yAxis of my chart.
This label should follow the intersection between a FastLineRenderableSeries (that i’m using to render a moving average filtered dataSeries) and the yAxis.

I tried to extend the “draw” method of the FastLineRenderableSeries to draw a label ontop of the yAXis, using the “drawModifiersAxisLabel” helper function. Like:

class CustomFastLineRenderableSeries extends FastLineRenderableSeries {
draw(renderContext: WebGlRenderContext2D, renderPassData: RenderPassData) {
    super.draw(renderContext, renderPassData)
    const yAxis = getYAxis(this.parentSurface);
    drawModifiersAxisLabel(
        yAxis,
        renderContext,
        150, // testing values
        "#00ff00", // testing values
        "#00ff00", // testing values
    );
}

but the label don’t get drawn.

The attached image shows the desired feature (image from another charting lib)

How can I implement this?

1 vote
1k views

I’m using an example of RealtimeTickingStockCharts

https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Examples/src/components/Examples/Charts2D/CreateStockCharts/RealtimeTickingStockCharts

I’ve added a modifier

new YAxisDragModifier({
            dragMode: EDragMode.Scaling,
        }),

I see icon changed to arrows but scaling does not work. What should I check ?

1 vote
1k views

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!

1 vote
4k views

How do I insert gaps in a heatmap series? At the moment null values seem to show as either the max value colour or the min value colour.

1 vote
2k views

Hi,

Is it possible to either rotate a TextAnnotation, not necessarily by user interaction but even just in code to have text going vertically?

Cheers,

  • Adam Stone asked 2 years ago
  • last active 2 years ago
1 vote
2k views

I am facing a little hurdle in plotting the date value to the chart.

How to add the date to chart x axis and numeric value to the y axis?
Please provide a example to add the date in x axis and numeric value in the y axis.

Please provide a example with one series in the y axis.

I have a requirement to plot the patient vital signs, the date value in x axis and vital signs in y axis.
x – Date when the vital sign is captured
y1, y2, y3, y4, y5 – BP, Heart rate & other vital signs

The model data looks like below.

{“x”:”29-Nov-2022 04:37″,”y1″:”119″,”y2″:”80″,”y3″:”15″,”y4″:”23.6″,”y5″:”86″},
{“x”:”29-Nov-2022 04:38″,”y1″:”119″,”y2″:”80″,”y3″:”15″,”y4″:”23.6″,”y5″:”87″},
{“x”:”29-Nov-2022 04:39″,”y1″:”119″,”y2″:”80″,”y3″:”15″,”y4″:”23.6″,”y5″:”86″}

1 vote
0 answers
7k views

I have a real time updated chart with multiple traces. I got run time error sometimes. It seems happening randomly. But it can be reproduced after a long run (e.g. 45 mins). I have checked, the memory condition is normal when the problem happens. Do you have any idea what’s wrong with it when I got this error?

1 vote
2k views

Hi there,

Wow this library has come along way in ten years. My question is related to interaction between RS and the legend that is rendered by the chartmodifier.

I declare the legend something like this during the initial bootstrapping of the plot view:

        const legend = new LegendModifier({placementDivId: "legend-goes-here", id:"legend"});
        sciChartSurface.chartModifiers.add(legend);

After that, I have a custom interface available for users to change things, which eventually results in visibility or color changes, updating an RS something like this:

        const thisRs = surface.renderableSeries.getById(`${s.fileId}-${s.name}`);
        if (thisRs) {
            thisRs.isVisible = s.isVisible;
            thisRs.stroke = s.visualInfo?.colorCode ?? "#FFFFFF";
        } 

These changes do not appear to be propagated to the legend despite the series on the plot changing. I guess my questions are:

1) What’s the expected behavior/is there something obvious I’m missing about the model?
2) Any suggestions?

It may very well be somewhere lost in my fairly complex React app, but I first wanted to confirm that I’m not missing something in the api.

Thanks!
Dan

1 vote
5k views

I have upgraded the SciChart version to v3.2 and tried to use the memory debugging tools. https://www.scichart.com/documentation/js/current/webframe.html#MemoryLeakDebugging.html

Below are few issues I found:

  • The example in the Memory Leak Debugging page got typo. It should
    import the MemoryUsageHelper instead of MemoryUsageTracker.

import { MemoryUsageTracker } from “scichart”;
MemoryUsageHelper.isMemoryUsageDebugEnabled = true;

  • When I turn on the memory debugger, I always got this warning when I
    move the crosshair in my chart. Is this expected?

DeletableEntity.js:70 Failed to remove
CursorTooltipSvgAnnotation_42d65afd-b859-4e14-b82d-7cda881cf1eb from
the Object Registry Probably it has been already deleted!

  • I also got the warning in point 2 when I try to delete annotation
    from the chart. I think it’s because I am trying to do something
    like this:

sciChartSurfaceRef.chartModifiers.remove(markerAnnotation);
markerAnnotation.delete();

The warning will be gone if I remove the second line above. Is it true that if I remove an annotation/dataSeries from a chart, I don’t need to remove that annotation/dataSeries manually afterward (i.e. annotation.delete()) ? Also, if I deleted a chart, I don’t need to delete it’s annotation/dataSeries manally, right?

  • Quyen Sy asked 8 months ago
  • last active 5 months ago
1 vote
2k views

As part of a recent flag added to 3.2.509, I moved from 3.2 to 3.2.509; it looks like positioning of the scichart legend has changed. The style is now appearing as position: absolute — I don’t have access to source, but I wonder if this was part of 3.2.491, which mentioned something about positioning of the legend?

Anyway, if this was an intended change — and if it’s not something I managed to do to myself — it broke my implementation of an outside-of-plot legend. This is how the style is currently appearing:

<div class="scichart__legend" style="height: 100%; position: absolute; display: flex; left: 0; top: 0; text-align: center;">
...
</div>

This is how it appeared my currently deployed code:

<div class="scichart__legend" style="height: 100%; display: flex; float: left; text-align: center;">
...
</div>

Anyway, should be able to figure something out I hope — I’m no CSS wizard — but wanted to flag it as a possible breaking change that might not have been intended.

1 vote
6k views

Hi, I wanted to make a multiple Y-Axis scale with multiple series plot into their respective Y scale. Like this,

Series A plot to 1st Y-axis Scale
Series B plot to 2nd Y-axis Scale
Series C plot to 3rd Y-axis Scale
Series D plot to 4th Y-axis Scale

and all those series are not overlapping each other. I want to do like the picture attached but with the series are not overlapping to each other.

1 vote
4k views

Hi,
I’m trying to implement a market footprint with SciChart framework, I mean is possible create like a plugin for implement in the framework?
My idea was set body color of all the candles invisible and than for every candle set two volume series in horizontal like in the image.

  • John Lepre asked 3 years ago
  • last active 4 months ago
1 vote
2k views

Hi,

I just registered here.
I want to use your tool to create one graph. But licence is too expensive for me. May I create graph during trial mode and use it?
What if trial licence expired? Already created graph will still working or not?

Thanks

1 vote
4k views

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.

1 vote
7k views

I’m looking for some direction on how to implement a modifier that reacts to interaction (mouse up/down etc) with a charts axis

  • User clicks on axis
  • Provide callback for side effect when clicked

Thanks

1 vote
3k views

I need to implement custom html legend instead of built-in options.
To hide built-in rollover I’m using series config:

    this.series.rolloverModifierProps.width = 0;
    this.series.rolloverModifierProps.height = 0;
    this.series.rolloverModifierProps.markerColor = "rgba(255, 255, 255, 0)";

I can’t set

 rolloverModifierProps.showRollover = false; 

because in that case rolloverModifierProps.tooltipDataTemplate handler is not firing.
My handler looks like

rolloverModifierProps.tooltipDataTemplate = (seriesInfo: SeriesInfo): string[] => {
            const ohlcInfo = seriesInfo as OhlcSeriesInfo;
            myOwnHandlerToPassDataToHtml({ high: ohlcInfo.highValue, low: ohlcInfo.lowValue, open: ohlcInfo.openValue, close: ohlcInfo.closeValue });
            return [];
        };

I’am wondering if there is any other way to hide rollover marker but keep tooltipDataTemplate handler firing?

1 vote
5k views

Hey, how would I go about adding a custom template for the cursor axis labels using the Javascript 2D chart API?

I’d like the x-axis to not just have a date in MM/DD/YYYY format but a date and time displayed. The current implementation is below, and below that is the desired implementation.

Current: https://ibb.co/qJgJ36j

Desired: https://ibb.co/XzTkDgw

I have looked through the documentation but I may have missed something. If I have, please point me in the right direction, thanks!

1 vote
4k views

I have XyDataSeries with 50 data points and I’m trying to insert another 50 data points to index 5. The same values can be inserted as a range to the beginning of the data series or inserted one by one starting from index 5. But they fail with “RuntimeError: memory access out of bounds” whenever I try to insert them as a range from index 5.

Code snippet:

const { xValues, yValues } = generateData(50);
const dataSeries = new XyDataSeries(wasmContext, { xValues, yValues, isSorted: false });
sciChartSurface.renderableSeries.add(new FastLineRenderableSeries(wasmContext, { dataSeries }));

// this works
dataSeries.insertRange(0, xValues, yValues);
// this works
for (let i = 0; i < xValues.length; i++) {
  dataSeries.insert(i + 5, xValues[i], yValues[i]);
}
// this fails
dataSeries.insertRange(5, xValues, yValues);

Codesandbox link: https://codesandbox.io/s/scichart-js-boilerplate-forked-hokfcn

I wonder if I’m doing something wrong or if this is an actual issue?

Side note: Index 5 is just an example, because it seems I can use the insertRange method when inserting to index 0-2, but it fails when inserting to index 3+ (in case of a chart with 50 existing data points)

1 vote
2k views

I have a color heatmap legend that need to update the yAxis range on the fly. The colorMap doesn’t update as expected. Here’s my codes to update the y axis and colorMap min/max of the heatmap legend:

const newRange = new NumberRange(newMin, newMax);
const yAxis = heatmapLegendRef.current.sciChartSurface.yAxes.items[0];
yAxis.majorDelta = newScale;
yAxis.minorDelta = newScale / 5;        
yAxis.visibleRange = newRange;
yAxis.visibleRangeLimit = newRange;
yAxis.zoomExtentsRange = newRange;

colorMapRef.current.minimum = newMin;
colorMapRef.current.maximum = newMax;
heatmapLegendRef.current.colorMap = colorMapRef.current;

The y axis range has been updated. But the colorMap didn’t. It seems that the colorMap of the heatmap legend cannot be changed. Is it true that I can only recreate the heatmap legend if I want to change the colorMap?

  • Quyen Sy asked 8 months ago
  • last active 8 months ago
1 vote
8k views

I’m looking on https://demo.scichart.com/javascript-multi-pane-stock-charts-sync-technique
I have a q react application. Can I add/remove subcharts(indicator panes) dynamically?

1 vote
4k views

I have been working with the new Overview Chart feature available in the new 2.0.0-beta.2084 release, and ran into an issue where I can remove lines from the overview surface no problem, but then I always receive an error whenever I try to add one.

I was just wondering if there is a recommended flow for when a parent chart’s renderable series array has traces added or removed. One thing I did try to circumvent this issue was to delete the old overview and add a new one, but I receive either a separate error or the overview would draw without any traces.

I have attached a file with example code that should display the error I receive when you add a line to an overview component. I have also attached an image of the error that appears in the console.

1 vote
8k views

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 version

Uncaught (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:

  1. Restart my webpack-dev-server -> In chrome, “Empty cache and refresh”
  2. Delete my node_modules folder -> yarn install -> yarn start

Can someone please help me with this issue at an earliest convenience.

1 vote
2k views

Hi,

I’ve had a request from the client of our app to set logarithmic axis to have their major ticks at powers of 10, for example 0.1|1|10|100|1000|10000 – they would be expressed as 1e-1|1e0|1e1|1e2|1e3|1e4…. etc.

Is this possible within the current implantation of the logarithmic axis?

Cheers,

  • Adam Stone asked 2 years ago
  • last active 2 years ago
1 vote
5k views

We are using JavaScript Chart Editable Annotations but we need some more modificaions in that which can enhance this feature in terms of user experience.
Currently when the anonations are loaded they are havinng a fixed shape but we want the annotations to be draggable as soon as they are loaded in the charts whitout any extra clicks,this feature is provided by tradingView charts and we also want to provide the same to our users.
I have attached images and videos for better understanding of the issue.
Hope we can get the solution of this issue asap.

Please refer to the below video link for beter understanding.
https://www.loom.com/share/213b66eb21db44f9ac2457a89563a21a

1 vote
5k views

I am trying to add an axis annotation to a heatmap legend. When this annotation is dragged, the color mapping of the heatmap series and the heatmap legend will be changed. How can I modify the colorMap.gradientStops of the heatmap series and the heatmap legend while the chart is running?

  • Quyen Sy asked 1 year ago
  • last active 1 year ago
1 vote
0 answers
2k views

We use a SciChartVerticalGroup instance to create multi-pane view and add additional charts for indicators under the main chart. After updating scichart 2.2.2407 -> 3.2.461 we face with the following error
(see the screen shot).

Error from chart in div cid1694501226340: TypeError: Cannot read properties of undefined (reading ‘invalidateElement’)

It occurs when we remove sub-pane and change the main chart line, for example from FastLineRenderableSeries to FastCandlestickRenderableSeries

There was no such error on version 2.2.2407

How we can I fix this?

1 vote
2k views

Hi –

I could not find an example in the various examples your provide

I have several charts in different components

When a component is closed I want to ensure the chart is destroyed and there is not potential for memory leak

What is this best way of doing this?

Thanks

1 vote
1k views

I have a chart with multiple series, left and right y-axes and one x-axis, some series are assign to left y-axis and some are right y-axis and they all have the same x-axis.

But there is one specific serie that need to be control on its own. I consider adding another y-axis either on the left or right axis, but the issue with that is that both the left and right axes are vertically stacked with some other y-axes. So, if I add another y-axis, it will just be stacked, but I need this y-axis to be on its own and not stacked.

The image below show my current chart, and the white line serie is the one that need a y-axis of its own. Currently it is attach to the right y-axis.

  • Nung Khual asked 3 months ago
  • last active 3 months ago
Showing 1 - 50 of 379 results