update chart, calendar and working with files
This commit is contained in:
Родитель
2457282acd
Коммит
ec16c77ed8
|
@ -18,11 +18,12 @@ The table below lists the supported view modes for each platform:
|
|||
| Day | ✔ | ✔ | ✔ |
|
||||
| MultiDay | ✔ | ✔ | ✔ |
|
||||
| Agenda | ✔ | ✔ | - |
|
||||
| Year | ✔ | ✔ | - |
|
||||
| Year | ✔ | ✔ | ✔ |
|
||||
| Week | ✔ | ✔ | - |
|
||||
| MonthNames | ✔ | - | - |
|
||||
| YearNumbers | ✔ | - | - |
|
||||
| YearNumbers | ✔ | - | ✔ |
|
||||
| Flow | ✔ | - | - |
|
||||
| Century | - | - | ✔ |
|
||||
|
||||
You could check how the most used view modes look on different platforms below:
|
||||
|
||||
|
|
|
@ -18,6 +18,8 @@ The **ScatterLineSeries** are represented on the chart as data points connected
|
|||
- **Stroke** (Color): changes the color used to draw lines.
|
||||
- **StrokeThickness** (double): changes the width of the lines.
|
||||
|
||||
>important If you want to style the series, on iOS both `Stroke` and `StrokeThickness` must be set
|
||||
|
||||
## Example
|
||||
|
||||
Here is an example how to create RadCartesianChart with ScatterLine Series:
|
||||
|
|
|
@ -61,39 +61,39 @@ Each of the above series of the same type may be combined in either [stacks or c
|
|||
- [**Candlestick**]({%slug chart-series-candlestick-series%}): Data points are plotted as visuals that resemble candlesticks.
|
||||
- [**Financial Indicators**]({%slug chart-series-financial-indicators%}): The financial, or also called stock indicators, are mainly used for keeping track of stock prices and patterns of price changes over time.
|
||||
|
||||
## Example
|
||||
## Step by Step Chart Definition
|
||||
|
||||
1. Define RadCartesianChart:
|
||||
|
||||
```XAML
|
||||
```XAML
|
||||
<telerikChart:RadCartesianChart>
|
||||
</telerikChart:RadCartesianChart>
|
||||
```
|
||||
```C#
|
||||
```
|
||||
```C#
|
||||
var chart = new RadCartesianChart();
|
||||
```
|
||||
```
|
||||
|
||||
2. The RadCartesianChart control needs two axes - horizontal and vertical to plot its data.
|
||||
1. The RadCartesianChart control needs two axes - horizontal and vertical to plot its data.
|
||||
|
||||
```XAML
|
||||
```XAML
|
||||
<telerikChart:RadCartesianChart.HorizontalAxis>
|
||||
<telerikChart:CategoricalAxis/>
|
||||
</telerikChart:RadCartesianChart.HorizontalAxis>
|
||||
<telerikChart:RadCartesianChart.VerticalAxis>
|
||||
<telerikChart:NumericalAxis/>
|
||||
</telerikChart:RadCartesianChart.VerticalAxis>
|
||||
```
|
||||
```C#
|
||||
```
|
||||
```C#
|
||||
chart.HorizontalAxis = new CategoricalAxis();
|
||||
chart.VerticalAxis = new NumericalAxis();
|
||||
```
|
||||
```
|
||||
|
||||
3. After that you can add the series to the RadCartesianChart.Series collection:
|
||||
1. After that you can add the series to the RadCartesianChart.Series collection:
|
||||
|
||||
```XAML
|
||||
```XAML
|
||||
<telerikChart:RadCartesianChart>
|
||||
<telerikChart:RadCartesianChart.Series>
|
||||
<telerikChart:BarSeries ItemsSource="{Binding CategoricalData}">
|
||||
<telerikChart:BarSeries ItemsSource="{Binding Data}">
|
||||
<telerikChart:BarSeries.ValueBinding>
|
||||
<telerikChart:PropertyNameDataPointBinding PropertyName="Value"/>
|
||||
</telerikChart:BarSeries.ValueBinding>
|
||||
|
@ -103,35 +103,41 @@ chart.VerticalAxis = new NumericalAxis();
|
|||
</telerikChart:BarSeries>
|
||||
</telerikChart:RadCartesianChart.Series>
|
||||
</telerikChart:RadCartesianChart>
|
||||
```
|
||||
```C#
|
||||
```
|
||||
```C#
|
||||
var series = new BarSeries();
|
||||
series.SetBinding(BarSeries.ItemsSourceProperty, new Binding("CategoricalData"));
|
||||
series.SetBinding(BarSeries.ItemsSourceProperty, new Binding("Data"));
|
||||
series.ValueBinding = new PropertyNameDataPointBinding("Value");
|
||||
series.CategoryBinding = new PropertyNameDataPointBinding("Category");
|
||||
chart.Series.Add(series);
|
||||
```
|
||||
```
|
||||
|
||||
4. You also have to set a BindingContext of the chart if none of its parents have a context:
|
||||
1. You also have to set a BindingContext of the chart if none of its parents have a context:
|
||||
|
||||
```XAML
|
||||
```XAML
|
||||
<telerikChart:RadCartesianChart.BindingContext>
|
||||
<local:ViewModel/>
|
||||
<local:CategoricalDataViewModel/>
|
||||
</telerikChart:RadCartesianChart.BindingContext>
|
||||
```
|
||||
```C#
|
||||
```
|
||||
```C#
|
||||
chart.BindingContext = new ViewModel();
|
||||
```
|
||||
```
|
||||
|
||||
Where `local` is
|
||||
|
||||
```XAML
|
||||
```XAML
|
||||
xmlns:local="clr-namespace:[The namespace where the ViewModel class is defined];assembly=[The assembly name]"
|
||||
```
|
||||
```
|
||||
|
||||
### CartesianChart Example
|
||||
1. Use the following business model
|
||||
|
||||
Here is the full definition of the chart:
|
||||
<snippet id='categorical-data-model'/>
|
||||
|
||||
1. And ViewModel:
|
||||
|
||||
<snippet id='chart-series-categorical-data-view-model'/>
|
||||
|
||||
## Example
|
||||
|
||||
First, create the needed business object, for example:
|
||||
|
||||
|
@ -141,7 +147,7 @@ Then create a ViewModel:
|
|||
|
||||
<snippet id='chart-series-categorical-data-view-model'/>
|
||||
|
||||
Finally use the following snippet to declare a RadPieChart with Pie Series in XAML and in C#:
|
||||
Finally use the following snippet to declare a RadCartesianChart with Bar Series in XAML and in C#:
|
||||
|
||||
<snippet id='chart-series-barvertical-xaml'/>
|
||||
<snippet id='chart-series-barvertical-csharp'/>
|
||||
|
|
|
@ -69,7 +69,7 @@ You would need to assign the .shp file containing the data through the **Source*
|
|||
|
||||
<snippet id='map-gettingstarted-setting-source' />
|
||||
|
||||
In the example the .shp file is loaded as an EmbeddedResource, there are other options as well, please check them in the [ShapefileLayer]({% slug map-layers-shapefilelayer%}) topic.
|
||||
>note In the example the .shp file is loaded as an EmbeddedResource, there are other options as well, please check them in the [ShapefileLayer]({% slug map-layers-shapefilelayer%}) topic.
|
||||
|
||||
This is the result:
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@ where the Source of the MapShapeReader should be defined as well:
|
|||
|
||||
<snippet id='map-interactionmode-settintsource' />
|
||||
|
||||
>note In the example the .shp file is loaded as an EmbeddedResource, there are other options as well, please check them in the [ShapefileLayer]({% slug map-layers-shapefilelayer%}) topic.
|
||||
|
||||
## Zoom Level Support
|
||||
|
||||
RadMap exposes properties for applying min and max zoom values.
|
||||
|
|
|
@ -20,24 +20,11 @@ The Pdf Document could be loaded from:
|
|||
|
||||
>tip Using this approach you have more control over the loading process, for example, you could modify the document after it is imported and before it is assigned as a Source to the PdfViewer control. For more details check [RadFixedDocument](https://docs.telerik.com/devtools/document-processing/libraries/radpdfprocessing/model/radfixeddocument) topic from RadPdfProcessing documentation.
|
||||
|
||||
You could use it in two ways:
|
||||
Example:
|
||||
|
||||
<snippet id='pdfviewer-key-features-source-fixed-method' />
|
||||
|
||||
or
|
||||
```C#
|
||||
private void ImportFixedDocument()
|
||||
{
|
||||
Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider provider = new Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider();
|
||||
Assembly assembly = typeof(KeyFeatures).Assembly;
|
||||
string fileName = assembly.GetManifestResourceNames().FirstOrDefault(n => n.Contains("pdfviewer-overview.pdf"));
|
||||
using (Stream stream = assembly.GetManifestResourceStream(fileName))
|
||||
{
|
||||
RadFixedDocument document = provider.Import(stream);
|
||||
this.pdfViewer.Source = new FixedDocumentSource(document);
|
||||
}
|
||||
}
|
||||
```
|
||||
>note The example shows a pdf document visualized as an EmbeddedResource. This is one of the options for loading a pdf with the PdfViewer control.
|
||||
|
||||
* **Uri**
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@ Another option to preload HTML is by retrieving it from a stream through the sta
|
|||
|
||||
<snippet id='richtexteditor-keyfeatures-fromstream' />
|
||||
|
||||
>note In the example the HTML file is loaded as an `EmbeddedResource`
|
||||
|
||||
Alternatively, you can create a [RichTextHtmlStreamSource](/devtools/xamarin/api/telerik.xamarinforms.richtexteditor.richtexthtmlstreamsource) object and set it as the <code>Source</code> of the RichTextEditor.
|
||||
|
||||
## Retrieving HTML Content
|
||||
|
|
Загрузка…
Ссылка в новой задаче