Hello,
Can someone explain how to set SeriesValueModifier.IsSeriesValueModifierEnabled for particular RenderableSeries in code?
- Roman asked 9 years ago
- You must login to post comments
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
- Andrew Burnett-Thompson answered 9 years ago
- You must login to post comments
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.
- Roman answered 9 years ago
- You must login to post comments
Please login first to submit.