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

1 vote
2k views

I am using the solution you provided on, https://www.scichart.com/questions/js/is-it-possible-to-create-info-box-that-will-sync-with-the-xaxis-of-the-chart.

The solution work great but there is one issue, the issue is that the text annotation should always be visible.

The issue with this solution is that the text annotation disappear if I zoom in somewhere not the text area.

Also another issue is that, in this example, the first info box x1 is beyond the current range, and so the text annotation is not visible, since the x1 of the text annotation is the same as info box and x1 is not within the current range.

First image show the first red info box x1 is not within current range, therefore not showing text annotation and the second info box working as expected with text annotation.

The second image show what happen once I zoom in on the right side away from the text annotation, then the ‘#21H’ is not visible anymore, which is wrong. Just like in my previous question example, the text annotation should always be visible, other than that, everything work great.

Thank you and let me know if there is any question.

  • Nung Khual asked 6 months ago
  • last active 6 months ago
0 votes
5k views

Hello,

I have a SciChartSurface with multiple StackedColumnRenderableSeries. The goal is to create a column style “Stacked Graph”.

The StackedColumnRenderableSeries are created this way:

private StackedColumnRenderableSeries[] m_layers = new StackedColumnRenderableSeries[0];
  -------
    while (num  > m_layers.Length)
              {                
                  StackedColumnRenderableSeries layer = new StackedColumnRenderableSeries()
                  {
                      DataPointWidth = 0.9,                  
                      Fill = new SolidColorBrush(DefaultMainColorOfCurrentSetting),
                      Stroke = Colors.Black,
                      ShowLabel = false  
                  };
  
                      layer.DataSeries = new XyDataSeries<double, double>();
                      layer.DataSeries.AcceptsUnsortedData = true;
  
                  m_sciChartSurface.RenderableSeries.Add(layer);
                 
                  List<StackedColumnRenderableSeries> temp = m_layers.ToList();
                  temp.Add(layer);
                  m_layers = temp.ToArray();
                 
              }
  

Later, they are fed data with this function:

void addBar(double[] layerValues)
          {
  
              using (m_sciChartSurface.SuspendUpdates())
              {   
                  for (int i = 0; i < m_layers.Length; i++)
                  {
                      XyDataSeries<double, double> data = (XyDataSeries<double, double>)m_layers[i].DataSeries;   
                      data.Append(m_currentTimepoint, layerValues[i]);
                  }
              }
  
              m_currentTimepoint++;
          }
  
  private int m_currentTimepoint = 1;
  

If I use this function within the class constructor, everything works as expected (see attached image).

However, sometimes, I receive the error message “”System.ArgumentException” in SciChart.Charting.dll The StackedColumnRenderableSeries type requires that all stacked stacked series with the same StackedGroupId have the same XValues.”

I fail to see the meaning of this message, since, the x-Value is the same for each part of the new column. Its “m_currentTimepoint”.

Additional Information:

This visualization is part of a medical monitoring software we are currently developing. If we use test data to call the addBar-Function (directly from the constructor, for example), the error does not appear. However, if we use data from our medical sensors, it appears. In both cases, the addBar-Function receives valid data (no NaN´s or such things)

The function is not called often, about once every 10 seconds.

Thank you

1 vote
2k views

Hi,

I am using the scichart for WPF an came across a problem. I am trying to create a thumbnail image of a size 300×200 pixels of my chart. I have tried using the ExportToStream method with option of specifying the size output, but that creates a smaller resolution image of my chart. I was hoping that it will resize the chart to the desired size and then make an image.
So I tried a second option which was to put the chart in a user control of a certain size and then use the RenderTargetBitmap to render the user control in an image. That resulted in a partial chart without the chart lines. Take a look at the attached?

Any ideas how to make the chart to be rendered in memory in full for a certain size?

Kind regards,
Boštjan

1 vote
2k views

Hi, I’m interested in putting WPF controls like buttons, data grids, sliders, etc. inside the chart.
Is that possible?

1 vote
1k views

When I put localized text in my annotations, and the user selects a different language while the chart is showing, do I have to rebuild my annotations?
I had hoped that I could register ‘globalized’ texts in my annotation object, and localize them in the getter method, but it seems that the getter method is not called every time the annotation text is displayed in a ToolTip

0 votes
1k views

Hi,

If the FastMountainRenderableSeries isVisible is true when creating a series and after sometimes tries to change the visible property and getting error from rolloverModifier.

Can you please check the example i have created.

1 vote
2k 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

Hello,

I need to customize the text for some points on a XyScatterRenderableSeries graph. The problem is that the dataLabelProvider available for XyScatterRenderableSeries is BaseDataLabelProvider, but it doesn’t have a metaDataSelector method and I can’t do it with it. Interestingly, using LineSeriesDataLabelProvider I was able to add text for the points I needed using metadata, but another problem arose. In this case, if there is only one point on the graph, the text will not be drawn.

Here is a small example of how text is drawn for different numbers of points. https://codepen.io/PodaRocheK/pen/jOXYGMJ?editors=0011

Can you advise me on how to display text near points more correctly in the case when I use XyScatterRenderableSeries and often this text should disappear or appear near some points. Thanks a lot!

1 vote
2k views

Hi,

Is it possible to toggle the DataLabels dynamically in the chart? Setting some values to true or false like isVisible property.

1 vote
0 answers
2k views

When using VisibleRange, I want to prevent the letters 0 and 360 from overlapping. I want to see 0 or only 360. please tell me how

  • HyunHo Lee asked 6 months ago
  • last active 6 months ago
1 vote
1k views

If I plot a SciChart3DSurface using UniformGridDataSeries3D to plot a SolidMesh – what is the maximum number if data points I can plot?

If I plot 16385 on x and 32 on z I get the debug message:

SciChart3DSurface didn’t render, because an exception was thrown:
Message: Grid mesh size exceeds hardware texture size

Is 16K the limit?

I came across this
https://abtsoftware.myjetbrains.com/youtrack/issue/SC3D-326
which seems to indicate maybe larger might be possible?

and I found on this page:
https://www.scichart.com/requirements-for-3d-surface-mesh-charts/#!

The current limit for the size of the 3D Surface Mesh chart is limited by the maximum texture size on your GPU, which in most cases is 40964096 and on some GPUs is larger, up to 16k * 16k.*

Is it possible at runtime to find out what the limit is (if it depends on the users hardware) so I can adapt the data if running on a lower capability platform rather than throwing an exception or displaying a blank graph?

Thanks

1 vote
2k views

Looking into https://www.scichart.com/documentation/js/current/typedoc/classes/scichartverticalgroup.html I see I can add surfaces to the group, but what about removing them?

I’ve constructed a problematic codepen to show a potential issue:
https://codepen.io/jrfv/full/JjwraLK

Any reason for not being able to remove surfaces from the group?

Thanks!

1 vote
2k views

Hello, everyone.

I want to add annotations for analyzing 3d charts.
In order to do that, it is necessary to be able to make several marks on the X-axis, Y-axis, and Z-axis, and I would like to know the best practices.

please check the attached picture. It is similar with cursor but it’s fixed.
I found Custom Geometry documents.
https://www.scichart.com/documentation/win/current/webframe.html#Adding%20Cubes%20and%20Custom%20Geometry%20to%20the%20Chart.html
but I am not sure this is for the best.

Thanks,
Kim, JinSeok.

1 vote
1k views

Hi,
the Tooltip from the rolloverModifier shows for the Open-Values the Label “Open”.

I would like to be able to change that. There might be serveral reasons for that. Maybe the shown data are not “openValues” or the word “open” needs to be translated into another language.

I managed to edit the title of a FastCandlestickRenderableSeries by setting a title and get it into the variable like this:

rolloverTitle = newtitle;
renderableSeries0.rolloverModifierProps.tooltipTitle = rolloverTitle;

unfortunately i did not find a way to set the name/label for the open-,low-,close-, or high-values of this Series.

Can someone give ma a hint how to do this?

1 vote
5k views

I need to serialize annotations. Not all the chart properties, but just Annotations.

I’ve tried to serialize the AnnotationCollection, as well as a List and neither works.

  • kelias asked 7 months ago
  • last active 7 months ago
1 vote
5k views

Hi SciChart,

We are experiencing a SciChart XPS export issue.

I am using a FlowDocumentPageViewer with a FlowDocument containing SciChart graphs. My goal is to export all pages of the FlowDocument to an XPS file using the XamlRenderSurface to save in vector graphics. However, I’m facing an issue where only the currently selected page exports correctly, while the other pages display empty graphs.

By default, we employ the VisualXcceleratorRenderSurface for all SciChart render surfaces. Before exporting, I programmatically switch them to XamlRenderSurface to save in vector graphics. This approach works well when all the graphs have been rendered on-screen at least once with the new surface type before exporting. However, if a graph hasn’t been rendered on-screen before exporting, it appears empty, and only the graphs from the selected page export correctly. You can find code snippets below.

XAML code:

<s:SciChartSurface
    x:Name="PART_Surface"
    ...
    RenderSurface="{TemplateBinding RenderType, Converter={StaticResource RenderTypeConverter}}"
    ...

Converter:

public class RenderTypeConverter : IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        // Set render settings
        return (RenderType)value switch
        {
            RenderType.DirectX => new VisualXcceleratorRenderSurface(),
            RenderType.HighQuality => new HighQualityRenderSurface(),
            RenderType.HighSpeed => new HighSpeedRenderSurface(),
            RenderType.Vector => new XamlRenderSurface(),
            _ => new HighSpeedRenderSurface(),
        };
    }
    ...
}

Export:

private void ExportVector(string fullPath)
{
    // Sets the RenderType to Vector for all surfaces
    // This invokes RenderTypeConverter to set the RenderSurface to XamlRenderSurface
    // Since they are bound in the XAML code
    SetAxesSurfacesRenderToVector();

    XPS_Export_AllPagesOfFlowDocument(fullPath);

    // DirectX is always the default for all surfaces that we use
    ResetAxesSurfacesToDirectX();
}
private void XPS_Export_AllPagesOfFlowDocument(string fullPath)
{
    using (var package = Package.Open(fullPath, FileMode.Create))
    {
        using (var xpsDocument = new XpsDocument(package, CompressionOption.Maximum))
        {
            var xpsSerializationManager = new XpsSerializationManager(new XpsPackagingPolicy(xpsDocument), false);
            var documentPaginator = ((IDocumentPaginatorSource)FlowDocument)?.DocumentPaginator;
            xpsSerializationManager.SaveAsXaml(documentPaginator);

            xpsDocument.Close();
        }
    }
}

The binding and the converter works for all offscreen elements, yet the they won’t take effect until rendered on screen at least once.
I have to select each page manually, after setting all graphs to use XamlRenderSurface, so each would be rendered on screen at least once before the export.

My question is: How can I export XamlRenderSurfaces that are off-screen and haven’t been rendered on-screen before the export process?

You can find an image below showcasing the problem.

Thank you and looking forward to your reply!

Best Regards,
Kaloyan Krastev

1 vote
5k views

I tried to create an WPF application that used a graph with LineRenderableSeriesViewModel and XYDataSeries to display real-time data. Cursor inspection was added to the chart as shown in the picture to make it easier to view the data. After some time I found out that when inspecting the cursor, if you move it quickly inside the chart, the CPU load increases several times.

Is there any elegant way to preserve performance with such manipulations?

My computer has a pretty good build but on weaker computers it causes some problems.

  • Processor: AMD Ryzen 7 5825U with Radeon Graphics 2.00 GHz
  • RAM: 16.0 GB (14.8 GB usable)
  • System: Windows 11 Pro (21H2)
1 vote
2k views

Hi,

EDataLabelSkipMode Customization is possible with some time range limit?
When i checked the documentation saw the options to skip the label for overlaping. Is it possible can add some index to skip the values. Eg: for Time chart One value is displayed in the chart at 10:30:00. So if i add some index value to skip the next 1 min data. So based on skip index next available value can ba displayed in chart. (10:31:00 or next available value). Can you implement this option to skip ?

1 vote
5k views

In this thread

running-in-linux

it mentions

SciChart (as of July 2023) currently targets the following platforms
WPF, with c# .net or netCore or .NET 6/7

I cannot find libraries for .NET7!
When I try to use netcoreapp3.1 libraries or net452 libraries I get a runtime error that it is unable to open the dll. Or is something else going wrong? I can see the relevant dll’s are copied to the output folder.

1 vote
0 answers
2k views

Hello,
I’m thinking to create a RenderableSeries on the React side for SciChart JS using XyDataSeries generated on my .NET backend. Is it possible to do so?

1 vote
2k views

Dear Andrew,

Thank you for the past answers. I have a new question. I have a heatmap with 2 line charts at its left aand top position. the top line chart plot the horizontal values where the mouse if hovering and left chart displays vertical values from the mouse position.

This is working great, but the issue is the heatmap is not always square and I am trying the aligh the line charts with the heatmap dimensions

two issues,

  1. the heatmap X/Y dimension are not always same, in fact I have a function which listens to the changing heatmap zoom factor and makes sure the X/Y are always “square” as we want to show the heatmap with square pixels. (see video #2) https://youtu.be/wXStF-7bWsw

  2. As I dynamically chage the size of the plot the… the proportion of actual chart area to axis lable changes thus varying the overlap. (see video #1) https://youtu.be/loAVpYSRJ38

Let me know if you need more information,

Best,

Pramod

1 vote
5k views

Hello again,

I would like to ask if there is a way to give a border (stroke and thickness) to horizontal and vertical line annotations.

I assume it has something to do with setting the WPF-style of the annotation element, but I’m running into a lot of errors while experimenting with this approach.

Is there an easy-to-understand example around?

Thank you verry much.

1 vote
2k views

Hi,

I have a chart that its visible range is controlled programatically.
Meaning that the user does not move through the chart with panning, rather I’m moving the chart programatically.

I’m using the visibleRange property of the x axis to scroll the chart rightwards.
When I do that, something weird happens with the chart – its flickering.

I have attached my code.

If this is not a bug, can you please explain why its happening? Also, if visibleRange is not supposed to be used like this, could you tell me how to achieve what i want in another way?

Thanks!

  • haba haba asked 7 months ago
  • last active 7 months ago
1 vote
0 answers
1k 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

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 7 months ago
  • last active 4 months ago
1 vote
5k views

Hello

In Tutorial 06b – Realtime Updates, I want change the <s:SciChartSurface.XAxis> from <s:NumericAxis/> to <s:DateTimeAxis/> . I have tried a lot, but it still doesn’t work.

Could you please help me to do this work.

Thank you very much.

  • Zhi Zhang asked 7 months ago
  • last active 7 months ago
0 votes
0 answers
2k views

Hello,
I’m looking at the iOS “Sync Multi Chart” example that is referenced here:
https://www.scichart.com/documentation/ios/current/tutorial-07—linking-multiple-charts.html

Source code is here:
https://github.com/ABTSoftware/SciChart.iOS.Examples/blob/SciChart_v4_Release/SciChart.Examples/Examples/Examples2D/CreateMultiseriesChart/SyncMultiCharts/SyncMultipleChartsView.swift

When the user does a pinch to zoom gesture the rollover is shown.
When the user does a double tap gesture the rollover is shown.
How do I stop the rollover from showing when pinching to zoom or double tapping to zoom out?
thanks,
Charlie

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 7 months ago
  • last active 7 months ago
1 vote
1k views

Good afternoon. Please tell me how can I change the Z index of the annotations so that the box annotation can overlap the text. Now no matter how I try to do it, the text is always above the rectangles. Does the JS version have some layers with annotations that can be changed by they Z like in this question – https://www.scichart.com/questions/wpf/changing-an-annotations-z-index

Unfortunately, I did not find this functionality in the JS version.

0 votes
2k views

I have a bubble chart with EllipsePointMarker as pointMarker and a custom palette provider to set the colors of the markers. I need to set a stroke in one of the markers but doesn’t matter what value I return as a stroke value from the overridePointMarkerArgb function, the stroke isn’t applied. Am I missing something?

1 vote
5k views

When running with scaling other than 100%, the results are very blurry.

I’ve come across this article https://support.scichart.com/index.php?/Knowledgebase/Article/View/17263/40/ which explains the reasoning. In that you’re always rendering at 96DPI no matter what the current scaling is set to.

It says to use the XamlRenderSurface, but this isn’t practical in most scenarios. For example, we want to render scatter plots. Enabling the XamlRenderSurface in your Scatter Chart example results in very poor performance even with only a small number of points being rendered.

So is the situation still the same from that 2019 article? You still don’t provide the option to render using the accelerated surface at anything other than 96 DPI?

I appreciate that the performance would be reduced, but it would surely be much better than the XamlRenderSurface?

  • Ben Green asked 7 months ago
  • last active 7 months ago
1 vote
5k views

In our app we have a feature by which user can add indicators. These indicators can consist of 2 or a maximum of 4 lines.

We don’t want to render svg tooltips(which setted up by the default) with data for each line, instead of that we get point data and pass it to our app inner service that can render indicator legend.

To prevent default tooltips from being displayed we set for each renderable series of an indicator the following values.

rolloverModifierProps.width = 0; rolloverModifierProps.height = 0;

But of course tooltips are still rendered in the DOM and this leads to performance issues when we have 3 or more indicators of this type.

My question is the following

How we can render only circles svg for rollover modifier and completely dont render svg for tooltips in the DOM?

This is what the indicators look like

0 votes
5k views

I updated schichart to the very last version and turn on the memory usage debug mode to see if there are any memory leaks in our application and ran into the following problem.

When MemoryUsageHelper.isMemoryUsageDebugEnabled = true; and sciChartSurface has the following modifiers(RolloverModifier, CursorModifier) when moving the mouse over the chart I have the following console warnings.

From RolloverModifier instance
From RolloverModifier instance

From CursorModifier instance
enter image description here
The message below is written on your docs about debugging, so I gues this is the case with the chart modifiers console warnings.

Usually this boils down to failing to call SciChartSurface.delete() (or series.delete()annotation.delete() when adding/removing objects) or plain JavaScript memory leaks where references to SciChart are held in the customer application & not garbage collected by the browser.

Steps To Reproduce

  1. Follow the codesandbox example by the link https://codesandbox.io/s/ts-band-chart-xwlxcm?file=/src/App.tsx;
  2. Once the chart is loaded and rendered, try moving the mouse cursor over the chart;
  3. Open the browser console ⇒ You will see the warnings I wrote about above.

The current behavior

Moving the mouse over the chart causes warning logs to appear in the browser console and possibly memory leaks.

The expected behavior

No warning logs while moving the mouse over the chart.

1 vote
0 answers
5k views

I am considering applying server-side licensing for my javerScript application.

In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support-dev.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)

However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)

I wonder if there is a sample code implemented in C++ for server-side licensing.

Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?

0 votes
5k views

On graphs with many axes it can often be difficult to read as the tics don’t line up with grid-lines.

What I would like to try is having a fixed number of grid lines (either a set number or based on the size of the graph) and then having all axis ticks aligned with the grid. To make the ticks human friendly I would then want to slightly zoom out each axis so that tics become nice numbers.

I am imagining it would also need to slightly adjust the zoom levels each time user interactions interact with the graph, i.e. if the user was to use a rubberband modifier to zoom in, I would expect I would need to hook in somehow to zoom out very slightly to get nice numbers on the tics, as they can no longer float about to nice values.

Is there any easy way I could experiment with something like this.

  • Hugoagogo asked 7 months ago
  • last active 5 months ago
0 votes
5k views

Setting VisibleRange in xaml or in code behind does not seem to work. It always defaults to (0.1, 100)

 <s:SciChartSurface x:Name="positiveScaleChart"
                    Loaded="OnLogarithmicAxisViewLoaded">

     <s:SciChartSurface.RenderableSeries>
         <s:FastLineRenderableSeries />
     </s:SciChartSurface.RenderableSeries>

     <s:SciChartSurface.XAxis>
         <s:NumericAxis TextFormatting="0"
                        VisibleRange="0, 100"
                        AutoRange="Never" />
     </s:SciChartSurface.XAxis>

     <s:SciChartSurface.YAxis>
         <s:LogarithmicNumericAxis AxisAlignment="Left"
                                   TextFormatting="0"
                                   AutoRange="Never"
                                   VisibleRange="-1, 10000">

         </s:LogarithmicNumericAxis>
     </s:SciChartSurface.YAxis>
 </s:SciChartSurface>



 public partial class LogarithmicAxisView : UserControl
 {
     public LogarithmicAxisView()
     {
         InitializeComponent();
     }

     private void OnLogarithmicAxisViewLoaded(object sender, RoutedEventArgs e)
     {
         var posDataSeries0 = new XyDataSeries<double, double>();

         var data1 = new DoubleSeries();

         for (int i = 0; i < 100; ++i)
         {
             data1.Add(new XYPoint() { X = i, Y = Math.Pow(i, 3) });
         }

         posDataSeries0.Append(data1.XData, data1.YData);
         positiveScaleChart.RenderableSeries[0].DataSeries = posDataSeries0;
         positiveScaleChart.YAxis.VisibleRange = new DoubleRange(-1, 10000);
     }
 }
  • Ben Green asked 7 months ago
  • last active 7 months ago
1 vote
5k views

We’re currently using the DataPointSelectionModifier which works great, however, we need some slight tweaks to it’s behaviour

  • The ability to disable marquee selection on demand (whilst still being able to multi select points by clicking each point)
  • Swap the Ctrl/Shift key combos

I was wondering if the source for the DataPointSelectionModifier could be made available for people to adapt to suit their needs? else it means trying to create it from scratch.

Perhaps you could post it in an area that only customers could access?

  • Ben Green asked 7 months ago
  • last active 7 months ago
1 vote
2k views

Hi,

I am facing a issue with latest version of SciChart. Because of this type error not able to build the project. Can you check this error.

0 votes
5k views

Hello,

I’m relatively new to SciChart and I’m facing a challenge with customizing the appearance of a dynamically created series that is bound to a SciChartSurface using SeriesBinding in WPF.

I have a VerticalSliceModifier in my XAML where I define a VerticalLineAnnotation. My series is created in code as a MountainRenderableSeriesViewModel and then bound to the chart using SeriesBinding. Here’s the relevant code snippets:

<s:SciChartSurface
    Grid.Row="1"
    Background="Transparent"
    BorderThickness="0"
    RenderableSeries="{s:SeriesBinding Series}"
    Annotations="{s:AnnotationsBinding Annotations}">

    <s:VerticalSliceModifier ShowTooltipOn="Never" Foreground="White" Name="sliceModifier">
        <s:VerticalSliceModifier.VerticalLines>
            <s:VerticalLineAnnotation X1="{Binding Number}" Style="{StaticResource sliceStyle}" />
        </s:VerticalSliceModifier.VerticalLines>
    </s:VerticalSliceModifier>

</s:SciChartSurface>


public class MountainRenderableSeriesViewModel
{
    public DataSeriesViewModel<double, double> DataSeries { get; set; }
    public DataTemplate RolloverMarkerTemplate { get; set; }
    // Other properties...

    public MountainRenderableSeriesViewModel()
    {
        // Initialize your DataSeries and other properties

        // Set the RolloverMarkerTemplate for this series
        RolloverMarkerTemplate = Application.Current.Resources["CustomRolloverMarkerTemplate"] as DataTemplate;
    }
}

My challenge is that I want to customize the RolloverMarkerTemplate for this dynamically created series. Most of the examples I’ve found show how to use RolloverMarkerTemplate with a statically defined series, but I cannot figure out how to assign it when the series is created in a ViewModel and bound to the chart using SeriesBinding.

Any guidance or code examples on how to achieve this customization would be greatly appreciated.

1 vote
2k views

Hi,

I’m using SciChart for macOS (v4.4.2.5871 installed via CocoaPods) and one thing that I tried was to implement the an axis to show full extent of data, as described in the first bullet of https://www.scichart.com/documentation/ios/current/axis-ranging—get-or-set-visiblerange.html#zooming-to-fit-all-the-data

However, what I’m getting is that after setting the visibleRange to match the dataRange, the dataRange no longer reflects the “true” range, but something else. Also “zoom to extent” no longer works

Attached is a super basic example (project) for this. To reproduce, do the following:

  1. Do a zoom (via pinch)
  2. Click the button titled “Set visibleRange to dataRange” -> this step works as expected
  3. Do a zoom
  4. Click again the button -> “zoom to extent” no longer works, dataRange is messed up
  • Vlad Badea asked 7 months ago
  • last active 7 months ago
0 votes
0 answers
1k views

Hi,

I’m using SciChart for macOS (v4.4.2.5871 installed via CocoaPods) and I’m trying to restrict the X axis’ visibleRange as described in https://www.scichart.com/documentation/ios/current/axis-ranging—restricting-visiblerange.html but what I’m getting is the app hanging so badly that even “Pause program execution” doesn’t work (I need to “Stop the running scheme or application”).
The sample code for this issue is super basic and is attached to this ticket, but in a nutshell the lines causing issues are:

xAxis.visibleRangeChangeListener = { axis, oldRange, newRange, _ in
    if newRange.minAsDouble < -10 {
        axis.visibleRange = oldRange
    }
}

The scenario to reproduce the problem is to pan until you hit -10 on X axis.

Let me know if I’m missing something obvious or if this is indeed an issue.

P.S. I have one more problem with setting the visibleRange , but I will open a different ticket because the behavior is different.

  • Vlad Badea asked 7 months ago
  • last active 7 months ago
1 vote
1k views

I’m trying to add an AxisMarkerAnnotations for some line series on my chart.

I was following these questions answered here:
https://www.scichart.com/questions/js/adding-axis-markers-to-fastlinerenderableseries
https://www.scichart.com/questions/js/price-indicators-on-yaxis

I managed to render the axis marker for my series. Now I’m trying to the set the Y value of the marker annotation as the value where the line intersects the Y Axis.
I want the marker value to be the last value of the series, only if the xAxis.visibleRange.max > series.XdataRange.max.

The two attached images show the desired feature.
One shows the marker annotation with the Y1 being the one where the line intersects the YAxis.
The other shows the marker annotation with the Y1 being the last value of the line, because it is visible.

I read some answers here on the forum about using the HitTest API to do this, but I couldn’t make it work on my JS app

1 vote
5k views

Hello.

I have a XYRenderableDataSeries with point markers with a fill color.

I also have a DataPointSelectionModifier which allows me to select clusters up to 5 from the series.

I want that when I select a cluster from the series, the points selected from the series should be colored for that specific cluster. i.e. all the cluster colors should be different. Also, when I select another cluster, the colors in the points selected from 1st cluster or other clusters should be preserved.

Here’s the XAML code :

<s:XyScatterRenderableSeries DataSeries="{Binding ScatterData}">
                    <s:XyScatterRenderableSeries.PointMarker>
                        <s:EllipsePointMarker  Width="3" Height="3" Fill="#AAFFFFFF" Stroke="SteelBlue" StrokeThickness="2"/>
                    </s:XyScatterRenderableSeries.PointMarker>
                    <s:XyScatterRenderableSeries.SelectedPointMarker>
                        <s:EllipsePointMarker Fill="{Binding ClusterColor, Mode=TwoWay}"
                                              Width="12"
                                              Height="12" />
                    </s:XyScatterRenderableSeries.SelectedPointMarker>
                </s:XyScatterRenderableSeries>

<s:SciChartSurface.ChartModifier>
                <s:ModifierGroup>
                    <s:DataPointSelectionModifier Name="PointMarkersSelectionModifier"
                                                  IsEnabled="{Binding IsManualClustering}"
                                                  SelectionChanged="PointMarkersSelectionModifier_SelectionChanged"
                                                  SelectionFill="#B1B5B2B2" 
                                                  SelectionStroke="#009E9C9C" />
                    <s:MouseWheelZoomModifier IsEnabled="True" />
                    <s:RubberBandXyZoomModifier IsEnabled="False" />
                </s:ModifierGroup>
            </s:SciChartSurface.ChartModifier>

I tried to find examples but could not find any. Please let me know if we can reach a solution to this in some way.

Thank you.

  • Ammar Khan asked 7 months ago
  • last active 7 months ago
1 vote
2k views

Hi, I want to create info boxes between xAxis and chart, info box will contain text, but the width/position of the box will be base on the xAxis and should sync with the chart (zoom etc). For example, if xAxis is from 1-100, and the first info box start from 1 to 10, then the width/position of the box should cover from 1-10, and if I zoom between 1-10, then info box should also sync and expand.

So far, I have created it using horizontal stacked xAxes and custom axis layout strategy provided by you. But the issue is that the stacked xAxes are not sync with the chart, for now, to make it seem sync, I am recalculating stacked axis length when zoom. But the issue comes when there should be gap between the info boxes, for example, if xAxis is 1-100 and the first box is 1-10 and the second box is 20-40, then there is a gap of 10 between the first and second. Right now, those gap are filled using empty xAxes, but they are not correct. When there is gap, the position of the boxes are wrong.

  • First image is my current implementation of it using custom axis layout and stacked xAxes.
  • Second image is how it look when zoomed
  • Third image is the gap issue with the current implementation
  • Fourth image is how the correct implementation should look like.

Codesanbox example:
https://codesandbox.io/s/scichart-stacked-xaxis-stacked-length-issue-3knt23?file=/src/App.tsx

  • Nung Khual asked 7 months ago
  • last active 7 months ago
1 vote
6k views

We are using the VerticalLineAnnotation and want to change it’s location (X1 property) in the viewmodel.

Annotations are bound like this:

<s:SciChartSurface
           ...
           Annotations="{s:AnnotationsBinding Annotations}"

to the property:

public ObservableCollection<IAnnotationViewModel> Annotations { get; private set; }

The collection contains this association:

this.nowAnnotation = new VerticalLineAnnotationViewModelEx()
        {
            X1 = TimeSpan.FromSeconds(0),
            StyleKey = "NowAnnotationStyle"
        };

To change the location we change the value of X1:

nowAnnotation.X1 = value;

Calling that didn’t have a direct effect on the UI unless the user does any action which redraws the chart.

We created a style which sets an attached property to pass the VerticalLineAnnotation to the view model, this works fine.

<Style TargetType="s:VerticalLineAnnotation" x:Key="NowAnnotationStyle">
                    <Setter Property="viewModels:VerticalLineAnnotationViewModelEx.PassIAnnotation" Value="True" />
                </Style>

And we added a Refresh method to VerticalLineAnnotationViewModelEx and call it after setting X1:

nowAnnotation.X1 = value;
nowAnnotation.Refresh();

The first implementation of the Refresh method we did was:

public void Refresh()
    {
        this.Annotation.Refresh();
    }

From the documentation this should redraw the annotation without redrawing the whole chart, but it had no effect.
https://www.scichart.com/documentation/win/current/webframe.html#SciChart.Charting~SciChart.Charting.Visuals.Annotations.AnnotationBase~Refresh.html

It only started working after changing to this:

public void Refresh()
    {
        this.Annotation.ParentSurface.InvalidateElement();
    }

Is there a better way to do it, shouldn’t the first implementation work?

The complete code of VerticalLineAnnotationViewModelEx

public class VerticalLineAnnotationViewModelEx : VerticalLineAnnotationViewModel
{
    public static readonly DependencyProperty PassIAnnotationProperty = DependencyProperty.RegisterAttached(
        "PassIAnnotation", typeof(bool), typeof(VerticalLineAnnotationViewModelEx),
        new PropertyMetadata(default(bool), OnPassIAnnotationChanged));

    public IAnnotation Annotation { get; private set; }

    private static void OnPassIAnnotationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
    {
        var verticalLineAnnotation = (VerticalLineAnnotation)d;
        ((VerticalLineAnnotationViewModelEx)verticalLineAnnotation.DataContext).Annotation = (IAnnotation)d;
    }

    public static void SetPassIAnnotation(DependencyObject element, bool value)
    {
        element.SetValue(PassIAnnotationProperty, value);
    }

    public static bool GetPassIAnnotation(DependencyObject element)
    {
        return (bool)element.GetValue(PassIAnnotationProperty);
    }

    public void Refresh()
    {
        //this.Annotation?.Refresh();
        this.Annotation?.ParentSurface.InvalidateElement();
    }
}
1 vote
5k views

Hi~
How to create dotted line cursor like a dashed line curve?
Thanks.

  • kim2 kim asked 7 months ago
  • last active 7 months ago
0 votes
6k views

I have created a demo app with the relevant code.

I have a tab control with 2 tabs, each one with a version of the SciChart surface showing multiple graphs stacked on top of each other.
The first (LAT) uses the standard WPF ListBox with each item contains a surface.
The second (ECG) uses a vertically stacked YAxis (from the customer examples).

Scenario
Select the second tab (ECG).
Press the Create button to create 50 waveforms.
(note – only a single graph is created)
Select the first tab, then select the 2nd tab.
(all 50 graphs are created)

HELP
I am unable to upload the .zip file (with the demo) or an images.
I select the file – but it does not upload

1 vote
2k views

Hi, I have an issue where I am trying to create multiple xAxes where one is normal and the rest are horizontally stacked. Then I calculate the stacked length of each stacked axes, but the issue comes when I change the width of the chart or inspect element, which would alter the width of the chart somehow, I got error saying the total width of the stacked axes is bigger than available size.

I have a codesanbox example of it:
https://codesandbox.io/s/scichart-stacked-xaxis-stacked-length-issue-3knt23?file=/src/App.tsx

I am using percentage for the stacked xAxes length and then I added them up to be 100% total, but somehow it is saying that it is more than available size.

So, my question is, how can I listen or get the width/size changes event of the chart/xAxis, so that I can calculate accordingly?

  • Nung Khual asked 7 months ago
  • last active 7 months ago
1 vote
1k 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 7 months ago
  • last active 7 months ago
1 vote
6k views

Code changes :
– Grab the SciChart_ScatterChart example

 <s:SciChartSurface Name="sciChart"
                Grid.Column="1"
                Padding="0"
                BorderThickness="0">

 <s:SciChartSurface.RenderableSeries>
     <s:XyScatterRenderableSeries x:Name="scatterRenderSeries0"
                                  Opacity="0.67">
         <s:XyScatterRenderableSeries.PointMarker>
             <s:EllipsePointMarker Width="14"
                                   Height="14"
                                   Fill="{StaticResource PointMarkerFillColor}"
                                   StrokeThickness="0" />
         </s:XyScatterRenderableSeries.PointMarker>
     </s:XyScatterRenderableSeries>
 </s:SciChartSurface.RenderableSeries>

 <s:SciChartSurface.XAxis>
     <s:NumericAxis DrawMajorBands="True"
                    GrowBy="0.1, 0.1"
                    VisibleRangeLimit="0, 0"
                    VisibleRangeLimitMode="Min" />
 </s:SciChartSurface.XAxis>

 <s:SciChartSurface.YAxis>
     <s:NumericAxis DrawMajorBands="True"
                    GrowBy="0.1, 0.1"
                    VisibleRangeLimit="0, 0"
                    VisibleRangeLimitMode="Min" />
 </s:SciChartSurface.YAxis>

 <s:SciChartSurface.ChartModifier>
     <s:ModifierGroup>
         <s:ZoomPanModifier ClipModeX="ClipAtMin" />
         <s:MouseWheelZoomModifier />
     </s:ModifierGroup>
 </s:SciChartSurface.ChartModifier>

Repro steps :

  • Zoom out using the wheel
  • Try to pan
  • Notice that it appears to apply an unwanted zoomToExtents operation

Can I also ask why there is still no ClipModeY for the ZoomPanModifier? there are a few posts relating to this with workarounds, but none of them seem to work as far as I can tell without weird side affects.

  • Ben Green asked 7 months ago
  • last active 7 months ago
Showing 151 - 200 of 4k results