Pre loader

How to set SeriesValueModifier.IsSeriesValueModifierEnabled in code?

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
0

Hello,
Can someone explain how to set SeriesValueModifier.IsSeriesValueModifierEnabled for particular RenderableSeries in code?

  • You must to post comments
0
0

I am thinking about using the Tauri framework which is similar to Electron and was wondering if the SciCharts licensing mechanics are Electron specific or if the same principles would be portable to another framework like Tauri?

I read through the licensing docs here that talk about how licensing works with Electron apps. I’ve looked through the boilerplate example here.

In Tauri it would be a similar setup with a frontend javascript IPC call to Rust (instead of nodejs) to retrieve the licence key.

Update:

A good example boilerplate template that uses Tauri and Vue is here.

In a similar fashion to the SciCharts Electron Demo the license key would be stored in the Rust backend:

tauri-vue-template/src-tauri/src/main.rs

#[tauri::command]
fn get_license() -> String {
   String::from("MY AWESOME LICENSE KEY")
}

fn main() {
  tauri::Builder::default()
    .invoke_handler(tauri::generate_handler![get_license])
    .run(tauri::generate_context!())
    .expect("error while running tauri application");
}

Then the key is set in the frontend via the RPC call from above with something like:

tauri-vue-template/src/components/HelloWorld.vue

<script setup lang="ts">
import { invoke } from '@tauri-apps/api'
...

invoke('get_license', {}).then((response) => {
    SciChartSurface.setRuntimeLicenseKey(response);
})

...
</script>

Tauri has a config file: src-tauri/tauri.conf.json which contains a section called “package” which contains a field called “productName”. The “productName” field seems to be similar to Electron’s “appID”. The config file API and format is described here.

Update #2

I managed to finally put together a working example of a basic Tauri App with a SciChart plot. The project with a README can be found here on GitHub: scichart-tauri-test.

After some more searching and reading it seems that Tauri uses a custom asset:// protocol and not a file:// protocol ref.

  • You must to post comments
0
0

Hi Roman,

Yes, its simply an attached property, so this code in XAML:

<s:FastLineRenderableSeries s:SeriesValueModifier.IsSeriesValueModifierEnabled="True"/>

is equivalent to this

var fastLineRenderableSeries = new FastLineRenderableSeries();
var seriesValueModifier = new SeriesValueModifier(); 
// ...
seriesValueModifier.SetIsSeriesValueModifierEnabled(fastLineRenderableSeries, true);

Best regards,
Andrew

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies