I need to add an image in a specific Column chart, but I have no idea how can I insert the image, any idea, tutorial ?
I am using the RadHtmlChart
this is my code:
<telerik:RadHtmlChart ID="Chart" runat="server" Width="680" Height="500">
<PlotArea>
<XAxis>
<LabelsAppearance>
<TextStyle Color="white" FontFamily="Arial" FontSize="13" />
</LabelsAppearance>
</XAxis>
<YAxis MinValue="0" >
<LabelsAppearance DataFormatString="${0:0,0}">
<TextStyle Color="white" FontFamily="Arial" FontSize="12" />
</LabelsAppearance>
</YAxis>
<Series>
<telerik:ColumnSeries Name="Garantías Vigentes" Stacked="true">
<LabelsAppearance Position="Center" DataFormatString="${0:0,0}">
<TextStyle Color="Black" FontFamily="Arial" Bold="True" FontSize="18" />
</LabelsAppearance>
<Appearance>
<FillStyle BackgroundColor="#87cb50"></FillStyle>
</Appearance>
<SeriesItems>
</SeriesItems>
</telerik:ColumnSeries>
</Series>
<Series>
<telerik:ColumnSeries Name="Saldo Vigente" Stacked="true">
<LabelsAppearance Position="Center" DataFormatString="${0:0,0}">
<TextStyle Color="Black" FontFamily="Arial" Bold="True" FontSize="18" />
</LabelsAppearance>
<Appearance>
<FillStyle BackgroundColor="#8DB4E2"></FillStyle>
</Appearance>
<SeriesItems>
<telerik:CategorySeriesItem Y="0"></telerik:CategorySeriesItem>
</SeriesItems>
</telerik:ColumnSeries>
<telerik:ColumnSeries Name="" > //In this Column I need to insert the image
<LabelsAppearance Position="Center" DataFormatString="${0:0,0}">
<TextStyle Color="Black" FontFamily="Arial" Bold="True" FontSize="0" />
</LabelsAppearance>
<Appearance>
</Appearance>
<SeriesItems>
<telerik:CategorySeriesItem Y="0"></telerik:CategorySeriesItem>
</SeriesItems>
</telerik:ColumnSeries>
</Series>
</PlotArea>
<Legend>
<Appearance Position="Bottom"><TextStyle Color="white" FontFamily="Arial" FontSize="20" Bold="True"/></Appearance>
</Legend>
</telerik:RadHtmlChart>
I found in the forums Telerik but I can not find anything similar.
thanks for yours comments
I don't see where you have attempted to add an image, but this would be possible only inside a series tooltip, because this is the only place in the chart that renders HTML, the rest is SVG/VML.
Take a look at these articles to see how to add HTML to your tooltips and bind it to database data, if needed (e.g., for the src attribute):
http://www.telerik.com/help/aspnet-ajax/htmlchart-client-templates-for-tooltips-and-labels.html
http://www.telerik.com/help/aspnet-ajax/htmlchart-client-templates-for-tooltips-and-labels-execute-javascript-and-display-html.html
Related
I know that this famous problem was covered by several forums and topics, and believe me I tried their solutions, but the famous error 10 from the Google Login is still there.
I will explain it the clearest way I can.
This is an Ionic project integrated with Capacitor using the "cordova-plugin-googleplus" plugin. I installed both cordova and ionic/native packages
I went to Google Cloud Platform and set the Web Client ID and Secret Key for Firebase Authentication
I have generate a keystore (the androiddebugkey example)
Then, I built the apk key from Android Studio (I also tried to generate it from the terminal) with V1 and V2 signatures, for debug and release apks and after that I signed them by terminal
After, I registered the SHA1 key in Firebase Project
I took the code example of the plugin documentation for the project and then tried to login in my device.
Ok, I get the google login screen but after that the error 10 comes along.
Solutions with no results:
I created a debug-signing.properties with the keystore and key info. I wrote the path to the debug-signing.properties in the gradle.properties. The three in the android folder.
keyAlias=androiddebugkey
keyPassword=android
storeFile=<PATH-TO-KEYSTORE>
storePassword=android
I added the cordova plugin variables in config.xml
<variable name="WEB_APPLICATION_CLIENT_ID" value="XXXXX.apps.googleusercontent.com" />
<variable name="REVERSED_CLIENT_ID" value="XXXX.apps.googleusercontent.com" />
</plugin>
I tried the google.login() function with different parameters
if (this.platform.is('capacitor'))
{
const googleAuth = await this.google.login({});
console.log(googleAuth);
const googleCredential = googleAuth.accessToken ?
firebase.auth.GoogleAuthProvider.credential
(
googleAuth.idToken,
googleAuth.accessToken
) :
firebase.auth.GoogleAuthProvider.credential(googleAuth.idToken);
console.log(googleCredential);
credential = await this.afAuth.signInWithCredential(googleCredential);
}
if (this.platform.is('capacitor'))
{
const googleAuth = await this.google.login({ 'webClientId': environment.webGoogleId,
'offline': true, 'scope': 'profile email' });
console.log(googleAuth);
const googleCredential = googleAuth.accessToken ?
firebase.auth.GoogleAuthProvider.credential
(
googleAuth.idToken,
googleAuth.accessToken
) :
firebase.auth.GoogleAuthProvider.credential(googleAuth.idToken);
console.log(googleCredential);
credential = await this.afAuth.signInWithCredential(googleCredential);
}
I checked the issue with android-client-id and web-client-id from google cloud OAuth to use web-client-id in the app, not android, with no results.
So finally I got no solutions
gradle.properties :
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
cdvDebugSigningPropertiesFile=debug-signing.properties
cdvReleaseSigningPropertiesFile=release-signing.properties
config.xml:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.company.comanda" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Comandera</name>
<description>Aplicacion para restaurantes</description>
<author email="hi#ionicframework.com" href="http://ionicframework.com/">Los movimentarios</author>
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<preference name="ScrollEnabled" value="false" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="SplashShowOnlyFirstTime" value="true" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="1000" />
<preference name="ShowSplashScreen" value="false" />
<platform name="android">
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
<application android:networkSecurityConfig="#xml/network_security_config" />
</edit-config>
<resource-file src="resources/android/xml/network_security_config.xml" target="app/src/main/res/xml/network_security_config.xml" />
<allow-intent href="market:*" />
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
<icon background="resources/android/icon/ldpi-background.png" density="ldpi" foreground="resources/android/icon/ldpi-foreground.png" />
<icon background="resources/android/icon/mdpi-background.png" density="mdpi" foreground="resources/android/icon/mdpi-foreground.png" />
<icon background="resources/android/icon/hdpi-background.png" density="hdpi" foreground="resources/android/icon/hdpi-foreground.png" />
<icon background="resources/android/icon/xhdpi-background.png" density="xhdpi" foreground="resources/android/icon/xhdpi-foreground.png" />
<icon background="resources/android/icon/xxhdpi-background.png" density="xxhdpi" foreground="resources/android/icon/xxhdpi-foreground.png" />
<icon background="resources/android/icon/xxxhdpi-background.png" density="xxxhdpi" foreground="resources/android/icon/xxxhdpi-foreground.png" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<icon height="57" src="resources/ios/icon/icon.png" width="57" />
<icon height="114" src="resources/ios/icon/icon#2x.png" width="114" />
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
<icon height="58" src="resources/ios/icon/icon-small#2x.png" width="58" />
<icon height="87" src="resources/ios/icon/icon-small#3x.png" width="87" />
<icon height="20" src="resources/ios/icon/icon-20.png" width="20" />
<icon height="40" src="resources/ios/icon/icon-20#2x.png" width="40" />
<icon height="60" src="resources/ios/icon/icon-20#3x.png" width="60" />
<icon height="48" src="resources/ios/icon/icon-24#2x.png" width="48" />
<icon height="55" src="resources/ios/icon/icon-27.5#2x.png" width="55" />
<icon height="29" src="resources/ios/icon/icon-29.png" width="29" />
<icon height="58" src="resources/ios/icon/icon-29#2x.png" width="58" />
<icon height="87" src="resources/ios/icon/icon-29#3x.png" width="87" />
<icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
<icon height="80" src="resources/ios/icon/icon-40#2x.png" width="80" />
<icon height="120" src="resources/ios/icon/icon-40#3x.png" width="120" />
<icon height="88" src="resources/ios/icon/icon-44#2x.png" width="88" />
<icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
<icon height="100" src="resources/ios/icon/icon-50#2x.png" width="100" />
<icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
<icon height="120" src="resources/ios/icon/icon-60#2x.png" width="120" />
<icon height="180" src="resources/ios/icon/icon-60#3x.png" width="180" />
<icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
<icon height="144" src="resources/ios/icon/icon-72#2x.png" width="144" />
<icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
<icon height="152" src="resources/ios/icon/icon-76#2x.png" width="152" />
<icon height="167" src="resources/ios/icon/icon-83.5#2x.png" width="167" />
<icon height="172" src="resources/ios/icon/icon-86#2x.png" width="172" />
<icon height="196" src="resources/ios/icon/icon-98#2x.png" width="196" />
<icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
<splash height="960" src="resources/ios/splash/Default#2x~iphone.png" width="640" />
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
<splash height="1125" src="resources/ios/splash/Default-Landscape-2436h.png" width="2436" />
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
<splash height="2048" src="resources/ios/splash/Default-Portrait#2x~ipad.png" width="1536" />
<splash height="1536" src="resources/ios/splash/Default-Landscape#2x~ipad.png" width="2048" />
<splash height="2732" src="resources/ios/splash/Default-Portrait#~ipadpro.png" width="2048" />
<splash height="2048" src="resources/ios/splash/Default-Landscape#~ipadpro.png" width="2732" />
<splash height="1136" src="resources/ios/splash/Default-568h#2x~iphone.png" width="640" />
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
<splash height="2436" src="resources/ios/splash/Default-2436h.png" width="1125" />
<splash height="2732" src="resources/ios/splash/Default#2x~universal~anyany.png" width="2732" />
</platform>
<plugin name="cordova-plugin-whitelist" spec="1.3.3" />
<plugin name="cordova-plugin-statusbar" spec="2.4.2" />
<plugin name="cordova-plugin-device" spec="2.0.2" />
<plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
<plugin name="cordova-plugin-ionic-webview" spec="^4.0.0" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
<plugin name="cordova-plugin-googleplus" source="npm">
<variable name="WEB_APPLICATION_CLIENT_ID" value="XXX.apps.googleusercontent.com" />
<variable name="REVERSED_CLIENT_ID" value="XXX.apps.googleusercontent.com" />
</plugin>
<allow-navigation href="http://localhost:8100" sessionid="15afd298" />
</widget>
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "com.company.comanda"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
flatDir{
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation project(':capacitor-android')
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation project(':capacitor-cordova-android-plugins')
}
apply from: 'capacitor.build.gradle'
try {
def servicesJSON = file('google-services.json')
if (servicesJSON.text) {
apply plugin: 'com.google.gms.google-services'
}
} catch(Exception e) {
logger.warn("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
}
Please if you can guide me somehow I will be very thankful.
How can I make one of the legend of a RadHtmlChart chart display unchecked by default when loading the chart.
Current Chart: current chart
Desired Chart: desired chart
Current telerik asp:
<telerik:RadHtmlChart runat="server" Skin="Bootstrap" ID="RhcIndicadores" Transitions="true">
<Legend>
<Appearance Position="Bottom"></Appearance>
</Legend>
<PlotArea>
<Series>
<telerik:ColumnSeries DataFieldY="Cantidad" Name="Cantidad">
<LabelsAppearance Position="InsideBase" DataFormatString="{0:0}">
<TextStyle Color="White" />
</LabelsAppearance>
<TooltipsAppearance>
<ClientTemplate>Cantidad: #=dataItem.Cantidad# requerimientos.</br>Participación: #= kendo.format(\'{0:N}\', dataItem.Participacion)#%.</br>Rango: #=dataItem.Rango#.</ClientTemplate>
</TooltipsAppearance>
</telerik:ColumnSeries>
<telerik:LineSeries DataFieldY="Participacion" Name="Participación" AxisName="AdditionalAxis">
<Appearance>
<FillStyle BackgroundColor="#ACB72F" />
</Appearance>
<LabelsAppearance DataFormatString="{0:N}%">
<TextStyle Color="#ACB72F" />
</LabelsAppearance>
<TooltipsAppearance DataFormatString="{0:N}%"></TooltipsAppearance>
</telerik:LineSeries>
<telerik:LineSeries DataFieldY="ParetoAcumulado" Name="Pareto Acumulado" AxisName="AdditionalAxisPareto">
<Appearance>
<FillStyle BackgroundColor="#5BC0DE" />
</Appearance>
<LabelsAppearance DataFormatString="{0:N}%" Position="Above">
<TextStyle Color="#5BC0DE" Bold="true" />
</LabelsAppearance>
<TooltipsAppearance DataFormatString="{0:N}%"></TooltipsAppearance>
</telerik:LineSeries>
</Series>
<XAxis DataLabelsField="Rango">
<LabelsAppearance RotationAngle="45"></LabelsAppearance>
<AxisCrossingPoints>
<telerik:AxisCrossingPoint Value="0" />
<telerik:AxisCrossingPoint Value="11" />
</AxisCrossingPoints>
<MajorGridLines Visible="false" />
<MinorGridLines Visible="false" />
</XAxis>
<YAxis Color="#337AB7">
<MajorGridLines Visible="false" />
<MinorGridLines Visible="false" />
</YAxis>
<AdditionalYAxes>
<telerik:AxisY Name="AdditionalAxis" Color="#ACB72F">
<LabelsAppearance DataFormatString="{0:N}%"></LabelsAppearance>
</telerik:AxisY>
<telerik:AxisY Name="AdditionalAxisPareto" Color="#5BC0DE">
<LabelsAppearance DataFormatString="{0:N}%"></LabelsAppearance>
</telerik:AxisY>
</AdditionalYAxes>
</PlotArea>
</telerik:RadHtmlChart>
I myself found the answer, in the desired series it should be indicated Visible="false" and VisibleInLegend="true":
<telerik:LineSeries DataFieldY="ParetoAcumulado" Name="Pareto Acumulado"
Visible="false" VisibleInLegend="true" AxisName="AdditionalAxisPareto">
<Appearance>
<FillStyle BackgroundColor="#5BC0DE" />
</Appearance>
<LabelsAppearance DataFormatString="{0:N}%" Position="Above">
<TextStyle Color="#5BC0DE" Bold="true" />
</LabelsAppearance>
<TooltipsAppearance DataFormatString="{0:N}%"></TooltipsAppearance>
</telerik:LineSeries>
I have a chart that is getting data from a SQL database in codebehind. Everything displays correctly and the series have the correct number on hover.
It is a stacked bar with the Show totals work a round found on this site.
http://www.telerik.com/support/kb/aspnet-ajax/chart-%28html5%29/details/displaying-grand-total-in-stacked-series-labels-and-pie-series-legend
I know the data coming from SQL is a number because I'm casting it to decimal.
The gTotal shows: "TL bbl: NaN"
If I just do TL bbls: #=dataItem.TotalRed# it shows undefined
Any Ideas?
code behind:
Dim daFMChart As New SqlDataAdapter(SQLFM, Conn)
daFMChart.Fill(DTFMChart)
Me.ColumnChart.DataSource = DTFMChart
Me.ColumnChart.DataBind()
The SQL data is this
+-------------------------------------------------+
| DateTime TotalRed TotalWhite gTotal |
+-------------------------------------------------+
| 2016-03-25 20000 3 0.0001 |
| 2016-03-24 30000 2601 0.0001 |
| 2016-03-23 50000 45626 0.0001 |
| 2016-03-22 10000 55568 0.0001 |
| 2016-03-21 30000 54098 0.0001 |
| 2016-03-20 10000 51351 0.0001 |
| 2016-03-19 20000 21973 0.0001 |
+-------------------------------------------------+
<ChartTitle Text="Daily Volume Total Per Meter">
<Appearance Align="Right" Position="Top">
<TextStyle Color="#999999" />
</Appearance>
</ChartTitle>
<Legend>
<Appearance Position="Right" Visible="true">
<TextStyle Color="#999999" />
</Appearance>
</Legend>
<PlotArea>
<Series>
<telerik:ColumnSeries Name="FM Red" DataFieldY="TotalRed" Stacked="true">
<LabelsAppearance Visible="false"></LabelsAppearance>
<Appearance>
<FillStyle BackgroundColor="#ff1a1a"></FillStyle>
</Appearance>
</telerik:ColumnSeries>
<telerik:ColumnSeries Name="FM White" DataFieldY="TotalWhite">
<LabelsAppearance Visible="false"></LabelsAppearance>
<Appearance>
<FillStyle BackgroundColor="#bfbfbf"></FillStyle>
</Appearance>
</telerik:ColumnSeries>
<telerik:ColumnSeries DataFieldY="gTotal" Stacked="true">
<Appearance FillStyle-BackgroundColor="#DDD9C3"></Appearance>
<LabelsAppearance Position="OutsideEnd">
<TextStyle Color="#999999" />
<TextStyle Margin="0" />
<ClientTemplate>
TL bbls: #=dataItem.TotalRed + dataItem.TotalWhite#
</ClientTemplate>
</LabelsAppearance>
<TooltipsAppearance Visible="false">
</TooltipsAppearance>
</telerik:ColumnSeries>
</Series>
<XAxis DataLabelsField="DateTime"></XAxis>
<XAxis>
<MajorGridLines Visible="false" />
<MinorGridLines Visible="false" />
<LabelsAppearance Step="1">
<TextStyle Color="#999999" />
</LabelsAppearance>
</XAxis>
<YAxis>
<MajorGridLines Visible="true" Color="#555555" />
<MinorGridLines Visible="false" />
<LabelsAppearance Step="1">
<TextStyle Color="#999999" />
</LabelsAppearance>
</YAxis>
</PlotArea>
<ChartTitle Text=""></ChartTitle>
Guess what..... Its a Bug.
Does not work with a Date column for the X Axis.
What a pain in the balls that was to figure out.
Had to use 3|24 as a string.. Could not use 3/24
I am working on a flex application comparing multiple instance of the mx:PlotChart class. I need normalize the various instances of the PlotCharts such that the change in data value per pixel between charts remains constant. To do this, I must find the area of the chart actually used for graphing (and not for the axis labels). The area I am looking for is show (highlighted in fuschia) in the attached screen shot.
Thanks,
-Kevin
I think you're looking for the width and height of the series. Below is an example using a ColumnChart, but of course this will work for another type of chart such as LineChart.
Suppose we have the following data:
<mx:XMLListCollection id="dp">
<fx:XMLList>
<quote date="8/1/2007" open="40.29" close="39.58" />
<quote date="8/2/2007" open="39.4" close="39.52" />
<quote date="8/3/2007" open="39.47" close="38.75" />
<quote date="8/6/2007" open="38.71" close="39.38" />
<quote date="8/7/2007" open="39.08" close="39.42" />
<quote date="8/8/2007" open="39.61" close="40.23" />
<quote date="8/9/2007" open="39.9" close="40.75" />
<quote date="8/10/2007" open="41.3" close="41.06" />
<quote date="8/13/2007" open="41" close="40.83" />
<quote date="8/14/2007" open="41.01" close="40.41" />
<quote date="8/15/2007" open="40.22" close="40.18" />
<quote date="8/16/2007" open="39.83" close="39.96" />
<quote date="8/17/2007" open="40.18" close="40.32" />
<quote date="8/20/2007" open="40.55" close="40.74" />
<quote date="8/21/2007" open="40.41" close="40.13" />
<quote date="8/22/2007" open="40.4" close="40.77" />
<quote date="8/23/2007" open="40.82" close="40.6" />
<quote date="8/24/2007" open="40.5" close="40.41" />
<quote date="8/27/2007" open="40.38" close="40.81" />
</fx:XMLList>
</mx:XMLListCollection>
And the following chart:
<mx:ColumnChart id="myChart" dataProvider="{dp}" showDataTips="true" width="300">
<mx:horizontalAxis>
<mx:CategoryAxis categoryField="#date"/>
</mx:horizontalAxis>
<mx:series>
<mx:ColumnSeries id="openSeries"
xField="#date"
yField="#open"
displayName="Open"/>
</mx:series>
</mx:ColumnChart>
Then we can access the width and height of the series:
<s:Label text="{openSeries.width}" />
<s:Label text="{openSeries.height}" />
I hope to find an answer on customizing Datagrid from WPF toolkit 2010. I'd like to add a TITLE area to be above DataGridColumnHeaderPresenter of the datagrid. The problem is that I want it to be as a user control or data template where I can populate the title from XML. I want to have unique titles for multiple datagrids on one page getting data from one XML. I populate few datagrids in the same window. What will be the best solution to add customizable Tile area for a content populated from XML and bounded to each datagrid to avoid dublication?
Thank you in advance. I generate datagrid with columns this way:
<Custom:DataGrid Grid.Column="0" Grid.Row="1" x:Name="ServerList" ItemsSource="{Binding Source={StaticResource PagesData}, XPath=ListTiles/Tile1}">
<Custom:DataGrid.Columns>
<Custom:DataGridTextColumn Header="Name" Binding="{Binding XPath=#Name}" />
<Custom:DataGridTextColumn Header="Status" Binding="{Binding XPath=#Status}" />
<Custom:DataGridTextColumn Header="Events" Binding="{Binding XPath=#Events}" />
<Custom:DataGridTextColumn Header="Services" Binding="{Binding XPath=#Services}" />
</Custom:DataGrid.Columns>
<Custom:DataGrid x:Name="Events" Grid.Column="0" Grid.Row="2" ItemsSource="{Binding Source={StaticResource PagesData}, XPath=ListTiles/Tile2}" >
<Custom:DataGrid.Columns>
<Custom:DataGridTextColumn Header="Name" Binding="{Binding XPath=#Name}" />
<Custom:DataGridTextColumn Header="Level" Binding="{Binding XPath=#Level}" />
<Custom:DataGridTextColumn Header="Source" Binding="{Binding XPath=#Source}" />
<Custom:DataGridTextColumn Header="In last 24h" Binding="{Binding XPath=#TimeSpan}" />
</Custom:DataGrid.Columns>
<Custom:DataGrid x:Name="Services" Grid.Column="2" Grid.Row="2" ItemsSource="{Binding Source={StaticResource PagesData}, XPath=ListTiles/Tile3}">
<Custom:DataGrid.Columns>
<Custom:DataGridTextColumn Header="Name" Binding="{Binding XPath=#Name}" />
<Custom:DataGridTextColumn Header="Status" Binding="{Binding XPath=#Status}" />
<Custom:DataGridTextColumn Header="Start" Binding="{Binding XPath=#Start}" />
</Custom:DataGrid.Columns>
XML:
<?xml version="1.0" encoding="utf-8"?>
<ListTiles xmlns="">
<Tile1>
<Header Title="ROLES & GROUPS" />
<Server Name="Kim" Status="ready" Events="1" Services="1" />
<Server Name="Sherri" Status="past" Events="2" Services="1"/>
<Server Name="Mike" Status="future" Events="3" Services="1" />
</Tile1>
<Tile2>
<Header Title="EVENTS" />
<Server Name="Young" Level="average" Source="home" TimeSpan="5" />
<Server Name="Sarah" Level="Critical" Source="work" TimeSpan="6" />
<Server Name="Susan" Level="normal" Source="friend" TimeSpan="2" />
</Tile2>
<Tile3>
<Header Title="SERVICES" />
<Server Name="Josh" DisplayName="FF" Status="Running" Start="Auto" />
<Server Name="Amy" DisplayName="DD" Status="Rest" Start="Auto" />
<Server Name="Bill" DisplayName="AS" Status="Work" Start="Auto" />
</Tile3>
</ListTiles>