-
Notifications
You must be signed in to change notification settings - Fork 5
MAUI-983567 - [Others] Updated axis line page UG #377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
AswiniDileep
wants to merge
5
commits into
development
Choose a base branch
from
MAUI-983567-Axis-line-documentation-sparckchart
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
dc58ce1
MAUI-983567 - [Others] Updated axis line page UG
AswiniDileep b917498
MAUI-983567 - [Others] Addressed review suggestions
AswiniDileep ba93711
MAUI-983567 - [Others] Added hyper links
AswiniDileep d6a2af2
MAUI-983567 - [Others] Addressed review suggestion
AswiniDileep 3f632a9
MAUI-983567 - [Others] Updated syncfusion tread mark
AswiniDileep File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,177 @@ | ||
| --- | ||
| layout: post | ||
| title: Axis in .NET MAUI Spark Chart Control | Syncfusion | ||
| description: Learn how to display and customize the axis in Syncfusion® .NET MAUI Spark Charts (SfSparkChart) using ShowAxis, AxisOrigin, and AxisLineStyle. | ||
| platform: maui-toolkit | ||
| control: SfSparkChart | ||
| documentation: ug | ||
| --- | ||
|
|
||
| # Axis in .NET MAUI Spark Charts (SfSparkChart) | ||
PreethikaSelvam marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Axis of the [SfSparkChart](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkChart.html) can be configured and customized using following properties. This feature is applicable for all the `SfSparkChart` types except [SfSparkWinLossChart](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkWinLossChart.html). | ||
PreethikaSelvam marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - [ShowAxis](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkChart.html#Syncfusion_Maui_Toolkit_SparkCharts_SfSparkChart_ShowAxisProperty) : Enables or disables the axis. Default value is `false`. | ||
| - [AxisOrigin](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkChart.html#Syncfusion_Maui_Toolkit_SparkCharts_SfSparkChart_AxisOriginProperty) : Sets the Y-value where the axis is drawn. Default it renders at `0`. | ||
| - [AxisLineStyle](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkChart.html#Syncfusion_Maui_Toolkit_SparkCharts_SfSparkChart_AxisLineStyleProperty) : Customizes the axis appearance | ||
| - [Stroke](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SparkChartLineStyle.html#Syncfusion_Maui_Toolkit_SparkCharts_SparkChartLineStyle_StrokeProperty) : Specifies the line color of the axis. | ||
| - [StrokeWidth](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SparkChartLineStyle.html#Syncfusion_Maui_Toolkit_SparkCharts_SparkChartLineStyle_StrokeWidthProperty) : Specifies the line thickness of the axis. Default it is set to 1. | ||
| - [StrokeDashArray](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SparkChartLineStyle.html#Syncfusion_Maui_Toolkit_SparkCharts_SparkChartLineStyle_StrokeDashArrayProperty) : Specifies the dash pattern for the axis. Default it is set to null. | ||
|
|
||
| --- | ||
PreethikaSelvam marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Enable the axis | ||
|
|
||
| Set the [ShowAxis](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkChart.html#Syncfusion_Maui_Toolkit_SparkCharts_SfSparkChart_ShowAxisProperty) property to display the axis at the chart’s origin in SfSparkChart; by default, the axis is set to `False`. | ||
PreethikaSelvam marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| {% tabs %} | ||
|
|
||
| {% highlight xaml %} | ||
|
|
||
| <sparkchart:SfSparkLineChart | ||
| ItemsSource="{Binding Data}" | ||
| YBindingPath="Value" | ||
| ShowAxis="True"> | ||
| </sparkchart:SfSparkLineChart> | ||
|
|
||
| {% endhighlight %} | ||
|
|
||
| {% highlight c# %} | ||
|
|
||
| var chart = new SfSparkLineChart | ||
| { | ||
| ItemsSource = new SparkChartViewModel().Data, | ||
| YBindingPath = "Value", | ||
| ShowAxis = true | ||
| }; | ||
|
|
||
| {% endhighlight %} | ||
|
|
||
| {% endtabs %} | ||
|
|
||
|  | ||
|
|
||
| --- | ||
PreethikaSelvam marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Axis origin | ||
|
|
||
| Set [AxisOrigin](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkChart.html#Syncfusion_Maui_Toolkit_SparkCharts_SfSparkChart_AxisOriginProperty) to draw the line at a specific Y value (for example, `0` to emphasize zero, or any custom value) of `SfSparkChart`. | ||
PreethikaSelvam marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| {% tabs %} | ||
|
|
||
| {% highlight xaml %} | ||
|
|
||
| <sparkchart:SfSparkLineChart | ||
| ItemsSource="{Binding Data}" | ||
| YBindingPath="Value" | ||
| ShowAxis="True" | ||
| AxisOrigin="8"> | ||
| </sparkchart:SfSparkLineChart> | ||
|
|
||
| {% endhighlight %} | ||
|
|
||
| {% highlight c# %} | ||
|
|
||
| chart.AxisOrigin = 8; | ||
|
|
||
| {% endhighlight %} | ||
|
|
||
| {% endtabs %} | ||
|
|
||
|  | ||
|
|
||
| --- | ||
PreethikaSelvam marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Style the axis | ||
|
|
||
| ### Stroke width | ||
|
|
||
| Controls the thickness of the axis of SfSparkChart. | ||
PreethikaSelvam marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| {% tabs %} | ||
|
|
||
| {% highlight xaml %} | ||
|
|
||
| <sparkchart:SfSparkLineChart.AxisLineStyle> | ||
| <sparkchart:SparkChartLineStyle StrokeWidth="2" /> | ||
| </sparkchart:SfSparkLineChart.AxisLineStyle> | ||
|
|
||
| {% endhighlight %} | ||
|
|
||
| {% highlight c# %} | ||
|
|
||
| chart.AxisLineStyle = new SparkChartLineStyle | ||
| { | ||
| StrokeWidth = 2 | ||
| }; | ||
|
|
||
| {% endhighlight %} | ||
|
|
||
| {% endtabs %} | ||
|
|
||
|  | ||
|
|
||
| ### Stroke color | ||
|
|
||
| Sets the color of the axis of SfSparkChart. | ||
PreethikaSelvam marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| {% tabs %} | ||
|
|
||
| {% highlight xaml %} | ||
|
|
||
| <sparkchart:SfSparkLineChart.AxisLineStyle> | ||
| <sparkchart:SparkChartLineStyle> | ||
| <sparkchart:SparkChartLineStyle.Stroke> | ||
| <SolidColorBrush Color="#333333" /> | ||
| </sparkchart:SparkChartLineStyle.Stroke> | ||
| </sparkchart:SparkChartLineStyle> | ||
| </sparkchart:SfSparkLineChart.AxisLineStyle> | ||
|
|
||
| {% endhighlight %} | ||
|
|
||
| {% highlight c# %} | ||
|
|
||
| chart.AxisLineStyle = new SparkChartLineStyle | ||
| { | ||
| Stroke = new SolidColorBrush(Color.FromArgb("#F9113D")) | ||
| }; | ||
|
|
||
| {% endhighlight %} | ||
|
|
||
| {% endtabs %} | ||
|
|
||
|  | ||
|
|
||
| ### Dashed line (StrokeDashArray) | ||
|
|
||
| Applies a dash pattern to the axis of SfSparkChart. | ||
PreethikaSelvam marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| {% tabs %} | ||
|
|
||
| {% highlight xaml %} | ||
|
|
||
| <sparkchart:SfSparkLineChart.AxisLineStyle> | ||
| <sparkchart:SparkChartLineStyle StrokeWidth="1.5"> | ||
| <sparkchart:SparkChartLineStyle.StrokeDashArray> | ||
| 4,2 | ||
| </sparkchart:SparkChartLineStyle.StrokeDashArray> | ||
| </sparkchart:SparkChartLineStyle> | ||
| </sparkchart:SfSparkLineChart.AxisLineStyle> | ||
|
|
||
| {% endhighlight %} | ||
|
|
||
| {% highlight c# %} | ||
|
|
||
| chart.AxisLineStyle = new SparkChartLineStyle | ||
| { | ||
| StrokeWidth = 1.5, | ||
| StrokeDashArray = new DoubleCollection { 4, 2 } | ||
| }; | ||
|
|
||
| {% endhighlight %} | ||
|
|
||
| {% endtabs %} | ||
|
|
||
|  | ||
|
|
||
| --- | ||
PreethikaSelvam marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Binary file added
BIN
+25.2 KB
maui-toolkit/Spark-Charts/sparkchart_axis_line_images/Default_axis_line.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+20.3 KB
maui-toolkit/Spark-Charts/sparkchart_axis_line_images/axis_line_stye.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+19.8 KB
maui-toolkit/Spark-Charts/sparkchart_axis_line_images/axis_origin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+22.2 KB
maui-toolkit/Spark-Charts/sparkchart_axis_line_images/axis_stroke_color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+20.4 KB
maui-toolkit/Spark-Charts/sparkchart_axis_line_images/axis_stroke_width.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.