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

0 votes
26 views

Hi,

I am looking for a way to unselect the annotation programatically. setting isSelected to false is not adviced and also does not really unselect the annotation (just remove the adorner 🙂 )

I want to provide an ability to hit “Esc” to unselect the annotation.

Please advice.

Best,

Pramod

0 votes
0 answers
30 views

Are there any native tools that will a user to drag/drop/delete points on a line series? I have a customer requirement that will allow the user to manually edit my series.

0 votes
0 answers
32 views

Hello,
we have a problem while executing our unit tests on our jenkins server.
The unit tests are run via the Nunit Console Runner.
In one specific Test project the unit test aborts with a “SocketException”.
The output looks like this:

Test Files D:\dev\jenkins\workspace\c\build\test....\source\Exec64_Release\Test.dll
Writing out DLLs to C:\Users\user\AppData\Local\SciChart\Dependencies\v8.1.0.27856\x64
System.Net.Sockets.SocketException : No connection could be made because the target machine actively refused it 127.0.0.1:65018

So because there is the line with “Writing out Dlls ….” which contains SciChart and the next line is the SocketException I just wanted to ask if there is something in SciChart which tries to connect to the localhost, I don’t know e.g. the licensing?
I don’t want to blame SciChart, I just want to ask if it could be possible. Because it is not easy to debug this scenario reliantly.

Best Regards,
Nick

0 votes
0 answers
54 views

Hello,

I am building an application where I use a WPF class library that calls sciChartSurface multiple times within my MainWindow application. Please refer to the attached screenshot.
I want to ensure that the Y-axis label widths are consistent across multiple chart surfaces. Specifically, I need a way to measure the total Y-axis label area of each chart and then set all the charts (with smaller Y-axis label areas) to match the chart with the largest Y-axis label area.
Additionally, I need the X-axis labels of all the charts to be synchronized, even when they contain different series configured as either single-axis or multi-axis.
Any suggestions or solutions to achieve this would be greatly appreciated.

Thank you.

0 votes
0 answers
56 views

I am trying to modify the tooltip with the following code:

function tooltipTemplate(
id: string,
seriesInfo: SeriesInfo,
rolloverTooltip: RolloverTooltipSvgAnnotation
) {
console.log({
id,
seriesInfo,
rolloverTooltip,
});
return <svg width="120" height="16">
<rect x="0" y="0" width="100%" height="100%" fill="${seriesInfo.stroke}"/>
<svg width="100%">
<text y="0" x="0" font-size="12" font-family="Verdana" dy="0" fill="white">
<tspan x="4" dy="1em">${seriesInfo.seriesName}: ${seriesInfo.formattedYValue}</tspan>
</text>
</svg>
</svg>
;
}

It is working but now all the tooltip are on top of each other, how can I fix that?

0 votes
0 answers
76 views

The real-time graph only shows the data of the last minute on the x-axis, and the VisibleRange property setting is invalid

private void InitializeChart()
{
    for (int i = 0; i < 50; i++)
    {
        var dataSeries = new XyDataSeries<DateTime, double> { FifoCapacity = 10 };
        Color color = Color.FromArgb(0xAA, (byte)random.Next(1, 256), (byte)random.Next(1, 256), (byte)random.Next(1, 256));
        var lineSeries = new FastLineRenderableSeries()
        {
            DataSeries = dataSeries,
            StrokeThickness = 2,
            Stroke = color
        };
        sciChart.RenderableSeries.Add(lineSeries);
        fastLines.Add(dataSeries);
    }
}

private void StartTimer()
{
var timer = new Timer(1000);
timer.Elapsed += (sender, e) =>
{
Dispatcher.Invoke(() =>
{
var currentDate = DateTime.Now;
for (int i = 0; i < fastLines.Count; i++)
{
var xAxis = sciChart.XAxes.OfType().FirstOrDefault();
if (xAxis != null&& xAxis.DataRange!=null)
{
var newRange = new DateRange(currentDate.AddSeconds(-60), currentDate);

                fastLines[i].XRange.Min = newRange.Min;
                //xAxis.VisibleRange = newRange;
                Application.Current.Dispatcher.BeginInvoke((Action)(() =>
                {
                    xAxis.InvalidateElement();
                }));
                sciChart.ZoomExtents();
            }
            if (fastLines[i].Count > 5 &&i>40)
            {
                break;
            }
            double y = (i + 1);
            fastLines[i].Append(currentDate, y);
        }
    });
};
timer.Start();

}

0 votes
0 answers
57 views

The note at the bottom of this page says:
“This feature can be used to create a Scatter Series, if strokeStyle contains a transparent Pen.”
https://www.scichart.com/documentation/android/current/articles/chart2d/2dChartTypes/Line%20Series.html?tabs=kotlin

If I set the lines stroke to transparent and set a point marker, nothing is rendered

    val rSeriesPL: IRenderableSeries = FastLineRenderableSeries()
    rSeriesPL.dataSeries = serPL
    rSeriesPL.strokeStyle = SolidPenStyle(0x01000000.toInt(), false, 20f, null) <<<< this works as the line is almost transparent (points show full red), but if I set it to 0x00FF0000, the point markers disappear too
    val scatterPointMarkerPL = EllipsePointMarker()
    scatterPointMarkerPL.setSize(10, 10)
    scatterPointMarkerPL.fillStyle = SolidBrushStyle(Color.Red.toArgb())
    scatterPointMarkerPL.strokeStyle = SolidPenStyle(Color.Red.toArgb(), false, 1f, null)
    rSeriesPL.pointMarker = scatterPointMarkerPL

This is in the android simulator (Just mentioning it because I’ve noticed other/unrelated oddness in the ios simulator)

  • w p asked 1 week ago
  • last active 1 day ago
0 votes
0 answers
69 views

Hi, I’ve been looking for alternatives to ChartJS and so far really like what I’m seeing with SciChart, but was just curious if there’s any JS support for Radar Charts? I can see that it’s supported in the WPF version https://www.scichart.com/documentation/win/current/The%20Radar%20Chart%20Type.html, but haven’t been able to find any similar documentation regarding the JS version

Thanks!

0 votes
0 answers
72 views

Is tvOS easily supported?

I get the following build error because tvOS isn’t listed in the package platforms:
/While building for tvOS Simulator, no library for this platform was found in ‘/Users/me/Library/Developer/Xcode/DerivedData/blahhhhhhhhhh/SourcePackages/artifacts/scichart-sp/SciChart/SciChart.xcframework’.

I suspect all the user interaction code would break on tvOS, but I’m just looking for static charts.

I found this which implies its possible, but the post is quite old.
https://www.scichart.com/questions/ios/scichart-was-built-without-full-bitcode

  • w p asked 1 week ago
0 votes
81 views

Hello,
We are developing an application whose main task is to display charts and allow users to add indicators to these charts. We have two requirements for drawing lines on the chart upon button click:

Option 1 (2 clicks):
– The user clicks on point A.
– The user moves the cursor over the chart and sees a line from point A to
the cursor (the line changes length with each mouse movement).
– On the second click, the line takes on the final parameters of the
second click.

Option 2 (mousedown && mouseup ):

  • I press the mouse on point A but do not release it.
  • I move the cursor over the chart (the line changes length with each mouse movement).
  • I release the mouse, and the line is drawn.

Is either of these options feasible? If not, is there any possibility of drawing lines through any user interaction?


At the moment, we have implemented line drawing by clicking on a point, and at that point, a short line is drawn that the user can adjust as they wish. However, there is a minor issue with retrieving the X and Y values:
const mouseX = clickEvent.offsetX;
const mouseY = clickEvent.offsetY;

const xValue = this.sciChartSurface.xAxes.get(0).getCurrentCoordinateCalculator().getDataValue(mouseX);
const yValue = this.sciChartSurface.yAxes.get(0).getCurrentCoordinateCalculator().getDataValue(mouseY);
These values are always shifted to the right and downward. Is there any additional trick I should use to fix it?

Thanks in advance.

Best regards,
Kamil

Link to chart: https://ibb.co/fnG9NV8

0 votes
0 answers
60 views

I’m having an issue when I try to plot about 40000 points or more on ios, it only renders a straight (randomly diagonal) line (maybe 2 points?).

  • I’m doing the exact same thing in android and it works fine there.
  • If I switch to a scatter plot it works fine too (on ios), so it seems like SCIFastLineRenderableSeries is the culprit.
  • I also noticed an issue where the number of points rendered in the simulator is seemingly limited, but on a physical device its not (I suspect this is unrelated, but might be of interest. It occurs at a much lower point count)
  • I haven’t narrowed down the exact point count where this issue surfaces, but I could if that would help. 40k is just a ballpark.
  • My data series acceptsUnsortedData (but again, works fine in android)
  • SwiftUI and v4.5.4

Ultimately the reason I’m plotting that many points is problematic for several other reasons, so this is about to be a non-issue for me (i.e. I’m just going to plot less points), but it seems like a bug that should be reported.

  • w p asked 2 weeks ago
0 votes
101 views

I am having an issue while trying to append 3d scatter points to a 3d surface.

The following error is being shown . I tired to looking into the documentation too.
Searched for a solution but didn’t find anything.

0 votes
93 views

I have an older version of SciChart, and I get this SystemException when I try to set the runtime license key.

System.Exception
HResult=0x80131500
Message=The registry key specified by the RegistryStoragePath property could not be opened.
Source=SciChart.Core

What am I doing wrong?

Thanks a lot

0 votes
0 answers
78 views

Hello,

With older version of SciChart in iOS some of the methods are not found. And migration doc couldnt help much. drawBands function from SCINumericAxis is removed from the latest version. How to handle this with the latest?

For drawing custom bands is it supposed to use annotations instead of drawing bands?

Thanks in advance

0 votes
85 views

Hi, I javascript I have a sciChart and I am using the RolloverModifier.
With this code

sciChartSurface.chartModifiers.add(
            new RolloverModifier({
                showRolloverLine: true,
                tooltipDataTemplate: getTooltipDataTemplate,
                placementDivId: "tooltip-div-id",
            })
const getTooltipDataTemplate = (seriesInfo, tooltipTitle, tooltipLabelX, tooltipLabelY) => {
            // Lines here are returned to the tooltip and displayed as text-line per tooltip
            const lines = [];
            const val = seriesInfo.yValue;
            const x = seriesInfo.formattedXValue
            lines.push(`Exposure ${Math.trunc(x)}`)
            if(seriesInfo.seriesName.includes('T8') && val != null) { lines.push(`${tooltipTitle}: ${val.toFixed(1)} °C` ); }
            if(seriesInfo.seriesName.includes('HU') && val != null) { lines.push(`${tooltipTitle}: ${val.toFixed(2)} %` ); }
            if(seriesInfo.seriesName.includes('mA') && val != null) { lines.push(`${tooltipTitle}: ${val} mA` ); }
            if(seriesInfo.seriesName.includes('Factor') && val != null) { lines.push(`${tooltipTitle}: ${val.toFixed(7)}` ); }
            return lines;
        };

I am able to obtain The first image where the tooltip are shown outside the chart area (just below the chart) and for each series there is a colored box. This is fine, but I do not really want individual boxes.

I then tries to use the tooltipLegendTemplate instead of tooltipDataTemplate and with this code:

// Add some interaction modifiers to show zooming and panning
sciChartSurface.chartModifiers.add(
new RolloverModifier({
showRolloverLine: true,
showTooltip: false,
tooltipLegendTemplate: getTooltipLegendTemplate,
placementDivId: “tooltip-div-id”,
}));

// Override the standard tooltip displayed by CursorModifier
        const getTooltipLegendTemplate = (seriesInfos, svgAnnotation) => {
            // Lines here are returned to the tooltip and displayed as text-line per tooltip
            let outputSvgString = "";
            let x;
            // Foreach series there will be a seriesInfo supplied by SciChart. This contains info about the series under the house
            seriesInfos.forEach((seriesInfo, index) => {
                let unit
                x = seriesInfo.formattedXValue
                switch(seriesInfo.seriesName) {
                    case "T8": unit = ' °C'; break;
                    case "HU": unit = ' %'; break;
                    case "Aging Factor Small": unit = ' %'; break;
                    case "Aging Factor Large": unit = ' %'; break;
                    case "Space Charge Factor Small": unit = ' %'; break;
                    case "Space Charge Factor Large": unit = ' %'; break;
                    case "mA first 40kV": unit = ' mA'; break;
                    case "mA first 50kV": unit = ' mA'; break;
                    case "mA first 60kV": unit = ' mA'; break;
                    case "mA first 95kV": unit = ' mA'; break;
                    case "mA first 125kV": unit = ' mA'; break;
                }
                outputSvgString += `<text x="8" y="${20*(index+2)}" font-size="16" font-family="Verdana" fill="${seriesInfo.stroke}">
                                    ${seriesInfo.seriesName}: ${seriesInfo.formattedYValue} ${unit}
                                    </text>`;
            });
            // Content here is returned for the custom legend placed in top-left of the chart
            return `<svg>
                        <text x="8" y="20" font-size="15" font-family="Verdana" fill="lightblue">Exposure ${Math.trunc(x)}</text>
                        ${outputSvgString}
                    </svg>`;
        };

With this code I can obtain the second image. But I would like to place the SVG outside of the chart area (just like I pointed in the image). The placementDivId: “tooltip-div-id” does not seem to work for tooltipLegendTemplate, it only works for tooltipDataTemplate. Can we place the SVG outside of the chart area?

Thank you !
Alex

0 votes
123 views

I’m migrating from LiveCharts to SciChart. With LiveCharts, adding a new point to the series is smooth, and you can see the animation playing as the new point is added.

I’m appending points to a FastLineRenderableSeries with FIFO mode. How can I implement the same effect, just like in LiveCharts?

  • Sami Lamb asked 2 weeks ago
  • last active 2 weeks ago
0 votes
0 answers
95 views

Hello, I am developing a financial chart in my android application and I am creating a Trendline. I want the trendLine name to be written on each created trendLine, but I could not find how to do it. I create LineAnnotation lineAnnotation = new LineAnnotation(getContext()); but the withAnnotationLabel property is not accessed from here. how can I do this? and can I make this name not always appear, but only when the trendline is clicked?

0 votes
105 views

Hello,

In my project I am using Non-Uniform Heatmap chart. My problem is that when I zoom in/out the performance is very poor and the FPS drops down a lot. First I thought the problem might be the size of heatmap I was rendering 10 x 3000, but then I tried to run example code from https://www.scichart.com/documentation/js/current/The-Non-Uniform-Heatmap-Chart-Type.html and it has the same performance issue with zValue of size 3×3

In my project I also use Uniform Heatmaps and these don’t have any visible performance issue, even for large amount of data.

I would be very grateful for your help in this matter

0 votes
0 answers
115 views

Hi,
I have a chart with VerticalLineAnnotation in VerticalSliceModifier,
new VerticalLineAnnotation()
{
XAxisId = XAxis.Id,
YAxisId =YAxis.Id,
LabelPlacement = LabelPlacement.BottomLeft,
ShowLabel =true,
X1 = 0.3,
CoordinateMode = AnnotationCoordinateMode.RelativeX,
IsEditable = true
};

Is there a easy way to set label to show axis value, not the Relative?
By the way VerticalLineAnnotation label can auto fit LabelPlacement? When I drag to edge, the label will be sheltered.

  • wei zhao asked 2 weeks ago
  • last active 2 weeks ago
0 votes
126 views

Hi, I am currently doing MVVM development with SciChart. Previously I was using thousands of LineRenderableSeriesViewModel to represent vertical lines along a profile. I noticed that this may be the cause for a slow-down, so I have attempted to merge all the LineRenderableSeriesViewModels into one view model, using double.NaN’s in between vertical lines to get gaps. This works fine, except if the first point is off-screen then everything else disappears. I am currently using the VisualXcceleratorEngine in my surface. The screenshots show what happens if I pan to the right a little bit and the first point goes off-screen. One thing I thought it was at first was the stationing was not monotonically increasing, but I have made it that way and it didn’t fix the problem. Tips would be appreciated.

0 votes
0 answers
126 views

Hello,

I want to display statistical data using a violin plot. Is it possible to create a violin plot using SciChart?
A violin plot is similar to a box plot, with the addition of a rotated kernel density plot on each side.

https://en.wikipedia.org/wiki/Violin_plot

regards,
Tobias

0 votes
122 views

In the “Central XAxis and YAxis” example, I saw how I could use IsCenterAxis to have the X-axis and Y-axis centers intersect vertically and appear in the center of the view, but the version I was using did not have the IsCenterAxis attribute.

  • Du Yeming asked 3 weeks ago
  • last active 2 weeks ago
0 votes
170 views

SciChanrts

body { margin: 0; }

scichart-root { width: 100%; height: 100vh; }

chart0
chart0

// Create a SciChartSurface in the div ‘scichart-root’

async function builderExample(divElementId) {

var data1 = [[1698350200000, 659.4081], [1698350200000, 709.4191], [1698347047000, 542.9722], [1698342726000, 652.2053], [1698338406000, 566.1798], [1698334075000, 616.6355], [1698329754000, 686.94464], [1698325434000, 581.1947], [1698321108000, 616.5695], [1698316788000, 687.024], [1698312467000, 514.56464], [1698308146000, 657.59796]];

var xArray = [];
data1.forEach(function (value,index) {
// xArray[index] = value[0]
xArray.push(new Date(value[0]));
})
var yArray = [];
data1.forEach(function (value,index) {
yArray.push(value[1]);
})

// Demonstrates how to create a line chart with SciChart.js using the Builder API
const {
chartBuilder,
EThemeProviderType,
NumberRange,
EAxisAlignment,
EAxisType,
ESeriesType,
ZoomPanModifier,
MouseWheelZoomModifier,
TextAnnotation,
ECoordinateMode ,
EHorizontalAnchorPoint ,
EVerticalAnchorPoint ,
FastLineRenderableSeries,
xyDataSeries
} = SciChart;

// or, for npm, import { chartBuilder, … } from “scichart”

// #region ExampleB
// If you want to show an XAxis with dates between 1st March 2023 and 10th March 2023
const minDate = new Date(xArray[xArray.length – 1]);
const maxDate = new Date(xArray[0]);
console.log(xArray[0] + “minDate “+ minDate);

console.log(xArray[0] + “maxDate “+ maxDate);
// Create data for the chart with X-data as dates using unix Timestamp / 1000

const { wasmContext, sciChartSurface } = await chartBuilder.build2DChart(divElementId, {
surface: { theme: { type: EThemeProviderType.Dark } },
xAxes: {
type: EAxisType.DateTimeNumericAxis,
options: {
axisTitle: “X Axis / DateTime”,
// We need to specify some visibleRange to see these two dates
// SciChart.js expects linux timestamp / 1000

visibleRange: new NumberRange(minDate.getTime()/1000, maxDate.getTime()/1000 )
}
},
yAxes: {
type: EAxisType.NumericAxis,
options: {
axisTitle: “Y Axis, Left, default formatting”,
axisAlignment: EAxisAlignment.Left,

visibleRange: new NumberRange(500, 800),
}
},
series: [
{
type: ESeriesType.MountainSeries,
options: {
strokeThickness: 3,
stroke: “#50C7E0”
},
xyData: { xArray, yArray }
}
]
});
// #endregion
sciChartSurface.chartModifiers.add(new ZoomPanModifier(), new MouseWheelZoomModifier());

// Add annotations to tell the user what to do
sciChartSurface.annotations.add(new TextAnnotation({
text: “DateTimeNumericAxis Demo”,
x1: 0.1, y1: 0.1,
yCoordShift: 0,
xCoordinateMode: ECoordinateMode.Relative, yCoordinateMode: ECoordinateMode.Relative,
horizontalAnchorPoint: EHorizontalAnchorPoint.Center, verticalAnchorPoint: EVerticalAnchorPoint.Center,
opacity: 0.33,
fontSize: 36,
fontWeight: “Bold”
}));
sciChartSurface.annotations.add(new TextAnnotation({
text: “Try mouse-wheel, left/right mouse drag and notice the dynamic X-Axis Labels”,
x1: 0.5, y1: 0.5,
yCoordShift: 50,
xCoordinateMode: ECoordinateMode.Relative, yCoordinateMode: ECoordinateMode.Relative,
horizontalAnchorPoint: EHorizontalAnchorPoint.Center, verticalAnchorPoint: EVerticalAnchorPoint.Center,
opacity: 0.45,
fontSize: 17,

}));
const lineSeries = new FastLineRenderableSeries(wasmContext);
lineSeries.strokeThickness = 3;
lineSeries.stroke = “rgba(255,0,0,1)”;
lineSeries.dataSeries = xyDataSeries;
sciChartSurface.renderableSeries.add(lineSeries);
};

// Uncomment this to use the builder example
builderExample(“scichart-root”);

0 votes
169 views

Hi,

I have some strange beaviour when using horisontaly stacked charts and cursors. When adding showYLine for the cursor it shows and both charts Y axis. How can I limit/add workaround so it only shows on the correct axis? See the screenshot.

Thank you.

0 votes
153 views

Hi,

I have prepared a test solution for the issues major and minot tick issue and for the issue of double axis titles. Please check the pdf, that I have attached and try testing my solution with versions v7.x and v8.x.
You should see the issues described in the report.

Kind regards,
Boštjan

0 votes
162 views

Hi,

I created multiple charts by using subchart api. I would like to know how to listen click() event for each subchart. In other words, how do I know which subchart is clicked by the user?

Thanks

  • Atanai W. asked 4 weeks ago
  • last active 4 weeks ago
0 votes
168 views

I know it is possible to create a dashed line annotation by using the StrokeDashArray property of a VerticalLineAnnotation or HorizontalLineAnnotation.

Is it possible to create a BoxAnnotation with a dashed border?

0 votes
210 views

Currently I’m using line series to render data of two different types. But when using legend, a separate entry is made for each line. I want a single legend for each data type.

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

        sciChartSurface.xAxes.add(new SciChart.NumericAxis(wasmContext));
        sciChartSurface.yAxes.add(new SciChart.NumericAxis(wasmContext));

        for (let i = 0; i < 5; i++) {
            const xValues = [1, 2, 3, 4, 5];
            const yValues = xValues.map(x => x * (i + 1));
            const dataSeries = new SciChart.XyDataSeries(wasmContext, { xValues, yValues, dataSeriesName: "file 1" });

            const lineSeries = new SciChart.FastLineRenderableSeries(wasmContext, {
                dataSeries,
                stroke: "red",
                strokeThickness: 2,
            });
            sciChartSurface.renderableSeries.add(lineSeries);
        }

        for (let i = 0; i < 5; i++) {
            const xValues = [1, 2, 3, 4, 5];
            const yValues = xValues.map(x => x * (i + 10));
            const dataSeries = new SciChart.XyDataSeries(wasmContext, { xValues, yValues, dataSeriesName: "file 2" });

            const lineSeries = new SciChart.FastLineRenderableSeries(wasmContext, {
                dataSeries,
                stroke: "blue",
                strokeThickness: 2,
            });
            sciChartSurface.renderableSeries.add(lineSeries);
        }

        const legendModifier = new SciChart.LegendModifier({
            placement: SciChart.ELegendPlacement.TopRight,
            orientation: SciChart.ELegendOrientation.Vertical,
            showLegend: true,
            showCheckboxes: true,
            showSeriesMarkers: true,
        });

        legendModifier.getLegendData = () => {
            return [{
                seriesName: "Grouped Lines",
                stroke: "#000000",
                seriesType: "LineSeries"
            }];
        };

        sciChartSurface.chartModifiers.add(legendModifier);
0 votes
219 views

Hi,

I am working on an application that involves realtime graphing of large amounts of data. Plotting the data in realtime is working flawlessly, except the legend checkboxes associated with the DataSeries are quite temperamental.

By temperamental, I mean that attempting to toggle a checkbox in the legend (via clicking the checkbox), only works sporadically. Resultantly, the users are required to click the checkbox multiple times until the checkbox is successfully toggled.

This only occurs while plotting realtime data, and I’m assuming it is related to the UI thread being bogged down.

I’ve tried setting the SciChartSurface.RenderPriority to low, but this failed to fix the issue. I’m unsure if there is anything you guys can do on your side; however, I figured I’d reach out just in case. Any tips would be much appreciated!

0 votes
0 answers
239 views

hello.

How can I stop the scrolling movement of a surface by inertia?
I don’t want to turn off the feature altogether by setting the inertial attribute to false, but I want to stop the scrolling that is in motion.
Is there any way to do this?

Looking forward to your reply. thx

0 votes
226 views

Hello.
I have real-time chart. It updates and X-axis always moving. When I added annotation like VerticalLineAnnotationViewModel to chart I choose the certain point on X-axis and after adding annotation it start moving with X-axis. It is OK.
But now I need to add VerticalLineAnnotationViewModel with calculated point on X-axis. I will be looks like constant static vertical line on moving chart. Can I make something like this?

0 votes
233 views

Hello,

Is there an equivalent JavaScript way to check if the hardware acceleration is enabled?

This snippet is from the WPF documentation.

Hardware-accelerated rendering check

if (sciChartSurface.RenderSurface.GetType() == typeof (VisualXcceleratorRenderSurface))
{
   // Hardware-accelerated rendering is enabled!
}

If there is no hardware acceleration in the browser available we do not want to render the SciChart surface.

Best,
Kras

0 votes
228 views

Hi,
am implementing a context menu that has the option to export screen shots of the chart as jpeg.
As soon as i click on the context menu, I loose the cursor modifier.

Possible to export/print the chart with the cursors with the contextmenu??

Thanks

  • P S asked 1 month ago
  • last active 4 weeks ago
0 votes
308 views

SciChartOne and sciChartTwo are bound to each other through AxisTitle.

However, I now need to display only the modified AxisLabelContainerStyle and AxisLabelTemplate when the mouse cursor is on SciChartOne. I noticed that besides the XAxis setting’s Style, there is also a default Style present, resulting in an orange label with a default green label underneath.

Could you please advise on how to completely override the green label when the mouse cursor is selected on this chart for SciChartOne?

Additionally, if the mouse cursor is not selected on this chart, I would like the XAxis to display a blue label.

Chart Code:(Both are the same)

                <Style x:Key="CursorLineStyle" TargetType="Line">
                    <Setter Property="StrokeThickness" Value="2"></Setter>
                    <Setter Property="Stroke" Value="Red"></Setter>
                    <Setter Property="StrokeDashArray" Value="2 2"></Setter>
                </Style>
                <Style x:Key="CursorModAxisLabelStyle" TargetType="s:AxisLabelControl">
                    <Setter Property="Background" Value="#AAFF6600"></Setter>
                    <Setter Property="BorderBrush" Value="#FFFF6600"></Setter>
                    <Setter Property="BorderThickness" Value="1"></Setter>
                </Style>
                <DataTemplate x:Key="CursorModAxisLabelTemplate" DataType="s:AxisInfo">
                    <StackPanel>
                        <TextBlock Foreground="White" FontFamily="Arial" FontSize="11" Margin="2" Text="{Binding DataValue, StringFormat='{}{0:0.00}'}"></TextBlock>
                    </StackPanel>
                </DataTemplate>


            <s:SciChartSurface.XAxis>
                <s:NumericAxis AxisTitle="{Binding XAxisTitle}" s:CursorModifier.AxisLabelContainerStyle="{StaticResource CursorModAxisLabelStyle}" s:CursorModifier.AxisLabelTemplate="{StaticResource CursorModAxisLabelTemplate}" VisibleRange="{Binding SharedXVisibleRange, Mode=TwoWay}"></s:NumericAxis>
            </s:SciChartSurface.XAxis>
            <s:SciChartSurface.ChartModifier>
                <s:ModifierGroup DataContext="{Binding Path=DataContext, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}}" s:MouseManager.MouseEventGroup="myCustomGroup">
                    <s:RubberBandXyZoomModifier IsEnabled="{Binding EnableZoom}"></s:RubberBandXyZoomModifier>
                    <s:ZoomPanModifier IsEnabled="{Binding EnablePan}" ClipModeX="None"></s:ZoomPanModifier>
                    <s:ZoomExtentsModifier></s:ZoomExtentsModifier>
                    <s:LegendModifier ShowLegend="True" Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Center"></s:LegendModifier>
                    <s:RolloverModifier ShowTooltipOn="MouseHover"></s:RolloverModifier>
                    <s:CursorModifier LineOverlayStyle="{StaticResource CursorLineStyle}"></s:CursorModifier>
                    <s:XAxisDragModifier DragMode="Pan"></s:XAxisDragModifier>
                    <s:YAxisDragModifier DragMode="Scale"></s:YAxisDragModifier>
                    <s:MouseWheelZoomModifier></s:MouseWheelZoomModifier>
                </s:ModifierGroup>
            </s:SciChartSurface.ChartModifier>
        </s:SciChartSurface>
0 votes
273 views

One of our users have a setup where they have a VM with very little graphics capabilities and it appears that when we open one of our SciChart panels for the first time, it takes about 4 minutes for everything to populate. The next time, it only takes a couple seconds as expected. This is a bit of a long shot question, but have you ever seen such an issue on any sort of machine? I’ve attached the settings we use for the VisualXcelleratorEngine.

Thanks for any help!
Matthew

0 votes
279 views

Hello
We were using wpf version prior to 6, we just purchased new license and downloaded latest, but we found the HitTest api is gone, below is our code, it tries to figure out the line being clicked and get its data series.
Could you please let us know how to replace HitTest api?
Thanks

Sally

private void ChartPointClicked(object sender, MouseButtonEventArgs e)
{
e.Handled = true;

        Point mousePoint = e.GetPosition(Chart.GridLinesPanel as UIElement);
        double datapointRadius = 8;
        bool useInterpolation = false;
        HitTestInfo result;
        if (LineSeries.DataSeries != null)
            result = LineSeries.HitTest(mousePoint,datapointRadius, useInterpolation);
        else if (BoxSeries.DataSeries != null)
            result = BoxSeries.HitTest(mousePoint, datapointRadius, useInterpolation);
        else
            return;

        if (!result.IsHit)
            return;

        if (result.DataSeriesIndex <= Events.Count)
        {
            List<wExportEvent> runs = new List<wExportEvent>();
            runs = Events.Select(x => x.Wsdl).ToList();
            OpenRunSummary(runs, result.DataSeriesIndex);
        }
    }
  • sally an asked 1 month ago
  • last active 1 month ago
0 votes
288 views

Hello,

I am trying to make my xAxes values to be in datetime, specifically i want to try and get the seconds since my graph will be 20 seconds worth of data.

I checked the Javascript examples however all of them resulted in a wrong date

            // ? Getting start Date
            const startDate = new Date(timestamp).getTime()
            // ? yValues Array size
            const totalPoints = yValues.length
            // ? Getting end Date
            const endDate = startDate + (totalPoints - 1) * 64
            // ? xValues Array. startDate + i * 64 ms
            const xValues = Array.from({ length: totalPoints }, (_, i) => startDate + i * 64)

            // ? xAxes
            const xAxes = new CategoryAxis(wasmContext, {
                defaultXStart: startDate,
                defaultXStep: 64,
                defaultXEnd: endDate,
                labelProvider: new SmartDateLabelProvider(),
                axisAlignment: EAxisAlignment.Bottom,
                autoRange: EAutoRange.Always,
                drawMajorGridLines: false,
                drawMinorGridLines: false,
            })
            sciChartSurface.xAxes.add(xAxes)
            xyDataSeries = new XyDataSeries(wasmContext, { xValues, yValues })

Notes:
– xValues array consists of 320 values from start date to end date going up by 64ms
– Yes all the values of xValues are correct, console logged and checked them manually
– I tried DateTimeNumericAxis but it resulted in the same thing as the below screenshot

0 votes
317 views

I would like to contact you about a crash.
I’m getting a crash on the line below. What is the cause?

ExtremeResamplersWrapper.h – Line 74 (EXC_BAD_ACCESS KERN_INVALID_ADDRESS)
ExtremeResamplingHelpersWrapper::MergeIndices(std::__1::vector<int, std::__1::allocator<int>>&, int, int, int*)

The issue seems to be related to a ResamplingMode, should I turn it off?
I sometimes apply separate formulas to certain axes, is this because of this? -> ex) Logarithmic Axis

Your answer would be greatly appreciated.

Below is a stacktrace.

0  SciChart                       0x901b4 ExtremeResamplingHelpersWrapper::MergeIndices(std::__1::vector<int, std::__1::allocator<int>>&, int, int, int*) + 74 (ExtremeResamplersWrapper.h:74)
1  SciChart                       0xa73c4 -[ResamplerDateDouble execute:resampledYValues:resampledY1Values:resampledIndices:xColumn:yColumn:y1Column:resamplingArgs:resamplingArgs1:] + 4040 (Resamplers.mm:4040)
2  SciChart                       0x1d110 -[SCIOhlcRenderableSeriesBase p_SCI_updateOhlcRenderPassData:dataSeries:resamplingMode:] + 137 (SCIOhlcRenderableSeriesBase.mm:137)
3  SciChart                       0x1cd88 -[SCIOhlcRenderableSeriesBase internalUpdateRenderPassData:dataSeries:resamplingMode:] + 111 (SCIOhlcRenderableSeriesBase.mm:111)
4  SciChart                       0x107480 -[SCIRenderableSeriesBase updateRenderPassDataWithXAxis:yAxis:renderPassState:] + 478 (SCIRenderableSeriesBase.mm:478)
5  SciChart                       0xf3fb0 -[SCIRenderSurfaceRenderer p_SCI_updateSeriesRenderPassData:xAxes:yAxes:renderPassState:] + 254 (SCIRenderSurfaceRenderer.m:254)
6  SciChart                       0xf3964 -[SCIRenderSurfaceRenderer p_SCI_updateCoreData:renderPassState:viewportSize:] + 175 (SCIRenderSurfaceRenderer.m:175)
7  SciChart                       0xf34b4 -[SCIRenderSurfaceRenderer p_SCI_renderLoop:assetManager:renderPassState:] + 101 (SCIRenderSurfaceRenderer.m:101)
8  SciChart                       0xf3364 -[SCIRenderSurfaceRenderer onDrawWithContext:andAssetManager:] + 95 (SCIRenderSurfaceRenderer.m:95)
9  SciChart                       0x45980 -[SCIRenderSurfaceDrawable2D drawFrameIn:withDrawableSize:] + 66 (SCIRenderSurfaceDrawable2D.mm:66)
10 SciChart                       0x7270c -[SCITwisterRendererBase drawFrameIn:withDrawableSize:] + 105 (SCITwisterRendererBase.mm:105)
11 SciChart                       0x2bd70 -[SCIMetalRenderSurfaceBase draw] + 134 (SCIMetalRenderSurfaceBase.m:134)
12 QuartzCore                     0x7e044 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 416
13 QuartzCore                     0xd90e0 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 464
14 QuartzCore                     0x4e028 CA::Transaction::commit() + 648
15 QuartzCore                     0x97d7c CA::Transaction::flush_as_runloop_observer(bool) + 88
16 UIKitCore                      0xb9ff4 _UIApplicationFlushCATransaction + 52
17 UIKitCore                      0xb776c _UIUpdateSequenceRun + 84
18 UIKitCore                      0xb73b0 schedulerStepScheduledMainSection + 172
19 UIKitCore                      0xb8254 runloopSourceCallback + 92
20 CoreFoundation                 0x56834 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
21 CoreFoundation                 0x567c8 __CFRunLoopDoSource0 + 176
22 CoreFoundation                 0x54298 __CFRunLoopDoSources0 + 244
23 CoreFoundation                 0x53484 __CFRunLoopRun + 828
24 CoreFoundation                 0x52cd8 CFRunLoopRunSpecific + 608
25 GraphicsServices               0x11a8 GSEventRunModal + 164
26 UIKitCore                      0x40a90c -[UIApplication _run] + 888
27 UIKitCore                      0x4be9d0 UIApplicationMain + 340
28 UIKitCore                      0x638384 keypath_get_selector_hoverStyle + 11024
  • cha cha asked 1 month ago
  • last active 1 month ago
0 votes
0 answers
301 views

I am using Scichart for EEG graph. It generally works very well. But now and then I see these messages:

[ANR Warning]onDraw time too long, this =com.scichart.drawing.canvas.RenderSurface{e7849f V.ED….. ……I. 0,0-2198,864}time =407 ms

This is running on Ulefone Armor 23 Ultra and has MediaTek 8020 processor. So, fairly OK processor. Also the total use of the CPU is never above 50%.

Is there anything I can do to diagnose the issue here?

0 votes
0 answers
2k views
<s:DataPointSelectionModifier Name="PointMarkersSelectionModifier"
                              IsEnabled="True"
                              SelectionChanged="PointMarkersSelectionModifier_SelectionChanged"
                              SelectionFill="Blue"
                              SelectionStroke="red" />
<s:MouseWheelZoomModifier IsEnabled="True" />
<s:RubberBandXyZoomModifier IsEnabled="False" />

I am developing in a wpf environment.
When first creating a chart, DataPointSelectionModifier was added in xaml. And every time specific data was created, I manually added XyScatterRenderableSeries to the series.

public static XyScatterRenderableSeries SetChartDataFotScatter(
    double x, double y,
    NumericAxis p_xaxis,
    NumericAxis p_yaxis,
    Brush color = null,
    Brush sel_color = null,
    MyMetadata selected = null)
{
    Color blue = color == null ? (Color)Application.Current.FindResource("Blue") : ((SolidColorBrush)color).Color;
    Color red = sel_color == null ? (Color)Application.Current.FindResource("Red") : ((SolidColorBrush)sel_color).Color;

    ///차트 생성
    var scatter = new XyScatterRenderableSeries();

    ///기본 marker
    EllipsePointMarker marker = new EllipsePointMarker() { Width = 10, Height = 10, StrokeThickness = 1, Opacity = 0.6 };

    ///MyMetadata에 의한 속성 값 변경시 특수하게 작동
    if (selected != null)
    {
        Binding binding            = new Binding("IsChecked");
        binding.Source             = selected;
        binding.Converter          = ScatterCheckToColor;
        binding.ConverterParameter = blue;
        marker.SetBinding(BasePointMarker.FillProperty, binding);
        marker.SetBinding(BasePointMarker.StrokeProperty, binding);
    }
    else
    {
        marker.Fill = blue;
        marker.Stroke = blue;
    }

    scatter.PointMarker = marker;

    ///선택시 marker style
    scatter.SelectedPointMarker = new EllipsePointMarker() { Width = 10, Height = 10, Fill = red, Stroke = red, StrokeThickness = 1, Opacity = 0.6 };

    ///축 적용
    scatter.XAxisId = p_xaxis.Id;
    scatter.YAxisId = p_yaxis.Id;

    ///데이터 생성
    XyDataSeries<double, double> data = new XyDataSeries<double, double>();

    if (selected != null)
        data.Append(x, y, selected);
    else
        data.Append(x, y);

    ///데이터 적용
    scatter.DataSeries = data;
    return scatter;
}






private Dictionary<string, IRange> wgp(Point gwe, Point gwf, IEnumerable<IAxis> gwg)
{
    srq.Clear();
    IEnumerator<IAxis> enumerator = gwg.GetEnumerator();
    try
    {
        while (enumerator.MoveNext() ? true : false)
        {
            IAxis current = enumerator.Current;
            bool isXAxis = current.IsXAxis;
            IComparable comparable = current.GetDataValue((isXAxis ? true : false) ? gwe.X : gwe.Y);
            IComparable comparable2 = current.GetDataValue((isXAxis ? true : false) ? gwf.X : gwf.Y);
            if (comparable.CompareTo(comparable2) > 0)
            {
                IComparable comparable3 = comparable;
                comparable = comparable2;
                comparable2 = comparable3;
            }
            IRange value = RangeFactory.NewWithMinMax(current.VisibleRange, comparable, comparable2);
            srq.Add(current.Id, value);
        }
    }
    finally
    {
        if (enumerator != null || 1 == 0)
        {
            enumerator.Dispose();
        }
    }
    return srq;
}

Then, if you try to select the scatter part with the drag drop, a nullException error occurs. It says IAxis current =null.
Why does this error occur?

0 votes
0 answers
2k views

hi. I have some questions.

Let’s say I have multiple surfaces.
I want to hide all but one of them, and I want the remaining surface to grow larger.

This will temporarily stretch the numeric value texts on the y-axis of that remaining surface.
If we want the bottom surface with the x-axis date to be larger, the date text below it will be stretched.

Additionally, when I make certain surface x-axis visibility hidden and other surface x-axes visible, there is a temporary flicker. I would like to resolve this issue as well.

I look forward to your response, thank you.

  • cha cha asked 2 months ago
  • last active 1 month ago
0 votes
2k views

Is there a plan to add WinUI3 and/or Maui support? We’ve decided to move to WinUI3 and now seen to be stuck with a WebView and JS libraries for 3Dcharts

0 votes
387 views

Hi,

I have implemented a scalable annotation which will pann and zoom with a heatmap,
see code below,

class ScalableAnnotation extends CustomAnnotation {
    constructor(...args) {
        super(...args)
        this.zoomFactor
        this.initialWidth
        this.initialHeight
        this.initialDiff
        this.initialCircleRadius
        this.diff
    }
    update(xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans) {
        super.update(xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans);
        if (!this.initialDiff) {
            this.initialDiff = xCalc.visibleMax - xCalc.visibleMin;
            this.initialCircleRadius = Number.parseFloat(d3.select(this.svg).selectAll('circle').attr('r'))
            this.initialCircleStrokeWidth = Number.parseFloat(d3.select(this.svg).selectAll('circle').style('stroke-width'))
            this.initialLineStrokeWidth = Number.parseFloat(d3.select(this.svg).selectAll('polygon').style('stroke-width'))
            this.initialWidth = Number.parseFloat(this.svg.getAttribute("width"));
            this.initialHeight = Number.parseFloat(this.svg.getAttribute("height"));
            this.zoomFactor = 1
        } else {
            this.diff = xCalc.visibleMax - xCalc.visibleMin;
            if (this.diff !== this.initialDiff) {
                this.zoomFactor = this.initialDiff / this.diff
                const width = this.initialWidth * this.zoomFactor;
                const height = this.initialHeight * this.zoomFactor;
                d3.select(this.svg).selectAll('circle').attr('r', (this.initialCircleRadius / this.zoomFactor) + 0.01)
                d3.select(this.svg).selectAll('circle').style('stroke-width', (this.initialCircleStrokeWidth / this.zoomFactor) + 0.003)
                d3.select(this.svg).selectAll('polygon').style('stroke-width', (this.initialLineStrokeWidth / this.zoomFactor) + 0.01)
                this.setSvgAttribute("width", width);
                this.setSvgAttribute("height", height);
                let borderX1 = this.getX1Coordinate(xCalc, yCalc) + this.xCoordShift;
                let borderY1 = this.getY1Coordinate(xCalc, yCalc) + this.yCoordShift;
                this.setAnnotationBorders(
                    borderX1,
                    borderX1 + width,
                    borderY1,
                    borderY1 + height
                );
                this.updateAdornerInner();
            }
        }
    }
}

This works fantastic when zooming in and zooming out or panning see video below,

Bur when we resize the heatmap, the annotations do not scan with the heatmap. see video below,

Any suggestion on how to deal with this scenario?

Thanks,

Pramod

0 votes
359 views

Hi thank you for resounding to other questions,

I have having a strange issue. When I add the ScatterRenderableSeries3D to a surface3D, the tooltip3D works. when I add more ScatterRenderableSeries3D it still works. but if I only update the xyzdataseries then the tooltip stops working.

Please see the code below,

            props.data.map(annotationData => {
            //console.log(annotationData)
            if (!sciChart3DSurfaceRef.current.renderableSeries.getById(annotationData?.id)) {
                if (annotationData.x.length > 0) {
                    //console.log("creating data", annotationData)
                    sciChart3DSurfaceRef.current.renderableSeries.add(new ScatterRenderableSeries3D(wasmContextRef.current, {
                        id: annotationData.id,
                        dataSeries: new XyzDataSeries3D(wasmContextRef.current, {
                            xValues: annotationData.x,
                            yValues: annotationData.y,
                            zValues: annotationData.z,
                            metadata: annotationData.metadata // Optional metadata here. Property vertexColor is read to color the point,

                        }),
                        // When metadata colours are provided, the pointMarker.fill is ignored
                        pointMarker: new SpherePointMarker3D(wasmContextRef.current, {
                            size: 2.0,
                        }),
                        opacity: 0.7
                    }));
                }
            }
            else {
                console.log("setting data", annotationData)
                const dataSeries = new XyzDataSeries3D(wasmContextRef.current, {
                    xValues: annotationData.x,
                    yValues: annotationData.y,
                    zValues: annotationData.z,
                    metadata: annotationData.metaata // Optional metadata here. Property vertexColor is read to color the point,
                })
                //console.log(sciChart3DSurfaceRef.current.renderableSeries.getById(annotationData.id))
                sciChart3DSurfaceRef.current.renderableSeries.getById(annotationData.id).dataSeries = dataSeries
            }
        })

When a new renderableSeries is added, the tooltip3d on that data works great! but if I add new dataseries like in else statement the tooltip3d disappears.

Any help is appreciated.

Pramod

0 votes
349 views

Hi,

In short, I am trying to do the same thing done here (https://www.scichart.com/questions/wpf/extend-latest-value-of-line-chart-to-right-of-view-port), except the types I am using are different and I am having trouble making it work.

We are using MVVM, where our data series is an XyDataSeries<DateTime, double> and our view models are LineRenderableSeriesViewModels. I am trying to make a custom class that inherits from one of those types so I can override the draw function just like the question I linked to did, so I don’t have to change away from any of the types we are already using. The problem is I am not seeing any overridable internal draw type of function for either of those two types. Is there one that I’m missing or is there a different way to approach this?

Thanks,
Clayton

0 votes
370 views

Sorry if this isn’t the best way to post this but I wasn’t sure what was a better approach. I made this post last week:
https://www.scichart.com/questions/wpf/stacked-y-axes-with-stacked-mountain-plots
I have created a test project which reproduces the issue, it is attached

Edit: I’ve uploaded a second attempt at sharing the test project

0 votes
395 views

Hi there,

I have a license in the past that expired March 13, 2024 for SC-BUNDLE-SDK-ENTERPRISE product.

I want to use SciChart JavaScript now, but if I use a pre-expired version of the package, can I use it without purchasing a license again?

When I tested it by applying the 3.3.567 version(published on February 28, 2024) according to the guidlines, it seems that the watermark does not disappear.

Thank you.

  • nada nada asked 2 months ago
  • last active 6 days ago
0 votes
391 views

I am not able to find a chart modifier to allow panning in 3D charts. Can you please point me to the correct modifier?

Thank you,

Pramod

0 votes
388 views

Hi,

What is the best way to update the XyzDataSeries3D data?

sciChart3DSurfaceRef.current.renderableSeries.items[0]

does not seem to have way to update xValues, yValues and zValues? these seem to be classes but i could not find the class method.

Thank you,

Pramod

0 votes
423 views

Hello,

I am creating a very demanding application with several vertically stacked charts. I would like to use the best approach for using brushes / pens / sprites and textures.

  1. Can I leave the resources between render passes or do I have to always dispose it after a render pass?
  2. Which method is the most performant when drawing images? Should I use ISprite2d or ITexture2d. Is the DrawSprites the most performant?
Showing 1 - 50 of 4k results