MockChartDataSource
[AddComponentMenu("ChartGuru/Data Sources/Mock Chart Data Source")][ExecuteAlways]public class MockChartDataSource : ChartDataSourceBase, IChartDataSourceComponent for generating mock chart data using the MockData system. Supports one-shot generation and continuous streaming with full configuration. Works in both Edit Mode and Play Mode.
Methods
Section titled “Methods”
ApplyData()
Section titled “ApplyData()”public override void ApplyData()Apply the generated data to all resolved target charts — both 2D ChartGuru.ChartGraphic targets and optional 3D ChartGuru.IChart3DHost targets (routed via ChartGuru.Chart3DIntegration when the ThreeD add-on is loaded).
BuildMarksForChartType(ChartType, ChartAuthoringStyleOptions)
Section titled “BuildMarksForChartType(ChartType, ChartAuthoringStyleOptions)”public override List<IChartMark> BuildMarksForChartType(ChartType chartType, ChartAuthoringStyleOptions style)Override that lets a UI Toolkit ChartGuruElement pull marks
directly from the live mock generator without an intermediate
ChartGuru.ChartGraphic. Honours the active style override.
Parameters
| Name | Type | Description |
|---|---|---|
chartType |
ChartGuru.ChartType | |
style |
ChartGuru.ChartAuthoringStyleOptions |
Returns
System.Collections.Generic.List{ChartGuru.IChartMark} — No return description is available.
SetSeriesGradient(int, LinearGradientStyle)
Section titled “SetSeriesGradient(int, LinearGradientStyle)”public void SetSeriesGradient(int seriesIndex, LinearGradientStyle gradient)Assigns a gradient override for a specific series index. The gradient is re-applied automatically whenever data is regenerated.
Parameters
| Name | Type | Description |
|---|---|---|
seriesIndex |
System.Int32 | |
gradient |
ChartGuru.LinearGradientStyle | |
ClearSeriesGradients()
Section titled “ClearSeriesGradients()”public void ClearSeriesGradients()Removes all per-series gradient overrides.
ApplySeriesGradientsToData()
Section titled “ApplySeriesGradientsToData()”public void ApplySeriesGradientsToData()Syncs the current gradient overrides into the already-generated series data and re-applies to the chart without regenerating values.
OnEnable()
Section titled “OnEnable()”protected override void OnEnable()No description is available for this member.
OnValidate()
Section titled “OnValidate()”protected override void OnValidate()No description is available for this member.
StartStreaming()
Section titled “StartStreaming()”public void StartStreaming()Start continuous data streaming.
StopStreaming()
Section titled “StopStreaming()”public void StopStreaming()Stop continuous data streaming.
ToggleStreaming()
Section titled “ToggleStreaming()”public void ToggleStreaming()Toggle streaming on/off.
GenerateOnce()
Section titled “GenerateOnce()”public void GenerateOnce()Generate mock data once and apply to the chart.
Properties
Section titled “Properties”
Pattern
Section titled “Pattern”public SeriesPattern Pattern { get; set; }The pattern for generating data values.
Returns
MockMagic.SeriesPattern — No return description is available.
SeriesCount
Section titled “SeriesCount”public int SeriesCount { get; set; }Number of data series to generate.
Returns
System.Int32 — No return description is available.
PointsPerSeries
Section titled “PointsPerSeries”public int PointsPerSeries { get; set; }Number of data points per series.
Returns
System.Int32 — No return description is available.
MinValue
Section titled “MinValue”public float MinValue { get; set; }Minimum value for generated data.
Returns
System.Single — No return description is available.
MaxValue
Section titled “MaxValue”public float MaxValue { get; set; }Maximum value for generated data.
Returns
System.Single — No return description is available.
NoiseFactor
Section titled “NoiseFactor”public float NoiseFactor { get; set; }Noise factor for generated data.
Returns
System.Single — No return description is available.
LabelPreset
Section titled “LabelPreset”public LabelPreset LabelPreset { get; set; }Label preset for generated data.
Returns
MockMagic.LabelPreset — No return description is available.
LabelOverflowMode
Section titled “LabelOverflowMode”public MockLabelOverflowMode LabelOverflowMode { get; set; }No description is available for this member.
Returns
ChartGuru.MockLabelOverflowMode — No return description is available.
LabelStartYear
Section titled “LabelStartYear”public int LabelStartYear { get; set; }No description is available for this member.
Returns
System.Int32 — No return description is available.
SeriesNames
Section titled “SeriesNames”public string[] SeriesNames { get; set; }Series names for multi-series data (optional, auto-generated if null/empty).
Returns
System.String[] — No return description is available.
EmissionInterval
Section titled “EmissionInterval”public float EmissionInterval { get; set; }Base interval between streaming emissions (seconds).
Returns
System.Single — No return description is available.
PointsPerEmission
Section titled “PointsPerEmission”public int PointsPerEmission { get; set; }Number of data points generated per streaming emission.
Returns
System.Int32 — No return description is available.
Rhythm
Section titled “Rhythm”public StreamRhythm Rhythm { get; set; }Rhythm mode for streaming data emission.
Returns
MockMagic.StreamRhythm — No return description is available.
IsStreaming
Section titled “IsStreaming”public bool IsStreaming { get; }Whether streaming is currently active.
Returns
System.Boolean — No return description is available.
DataMode
Section titled “DataMode”public MockDataMode DataMode { get; set; }How to handle incoming streaming data.
Returns
ChartGuru.MockDataMode — No return description is available.
MaxDataPoints
Section titled “MaxDataPoints”public int MaxDataPoints { get; set; }Maximum number of data points when appending/prepending.
Returns
System.Int32 — No return description is available.
DataShape3D
Section titled “DataShape3D”public MockChart3DDataShape DataShape3D { get; set; }No description is available for this member.
Returns
ChartGuru.MockChart3DDataShape — No return description is available.
UseDeterministicSeed
Section titled “UseDeterministicSeed”public bool UseDeterministicSeed { get; set; }No description is available for this member.
Returns
System.Boolean — No return description is available.
public int Seed { get; set; }No description is available for this member.
Returns
System.Int32 — No return description is available.
BarWidth3D
Section titled “BarWidth3D”public float BarWidth3D { get; set; }No description is available for this member.
Returns
System.Single — No return description is available.
BarDepth3D
Section titled “BarDepth3D”public float BarDepth3D { get; set; }No description is available for this member.
Returns
System.Single — No return description is available.
SymbolSize3D
Section titled “SymbolSize3D”public float SymbolSize3D { get; set; }No description is available for this member.
Returns
System.Single — No return description is available.
LineThickness3D
Section titled “LineThickness3D”public float LineThickness3D { get; set; }No description is available for this member.
Returns
System.Single — No return description is available.
SurfaceResolutionX
Section titled “SurfaceResolutionX”public int SurfaceResolutionX { get; set; }No description is available for this member.
Returns
System.Int32 — No return description is available.
SurfaceResolutionZ
Section titled “SurfaceResolutionZ”public int SurfaceResolutionZ { get; set; }No description is available for this member.
Returns
System.Int32 — No return description is available.
SurfaceStyle3D
Section titled “SurfaceStyle3D”public SurfaceStyle SurfaceStyle3D { get; set; }No description is available for this member.
Returns
ChartGuru.SurfaceStyle — No return description is available.