Button1.Click
XDW.Documents.Report.Report() UltraChart1.RenderPdfFriendlyGraphics(r.AddSection().AddCanvas().CreateGraphics()) r.Publish(
UltraChart1.RenderPdfFriendlyGraphics(r.AddSection().AddCanvas().CreateGraphics())
r.Publish(
, XDW.Documents.Report.FileFormat.PDF)
Sub
.Load
Dim myColumn As New
DataTable myColumn.Columns.Add(
myColumn.Columns.Add(
)) myColumn.Columns.Add(
))
[Object]() {2, 3})
UltraChart1.DataSource = myColumn
End Sub
For pie chart we cant save pdf with color for single entity
code is above
wht can i do?
there is any solution?
your chart has is using a default color model, which is set to PureRandom. Every time the page posts back when you click the button, the color of your pie chart changes and so the color in the pdf is not the same as it was on the page before you posted back. If you use a non-random color model, you shouldn't have this problem.
UltraChart1.ColorModel.ModelStyle = Infragistics.UltraChart.Shared.Styles.ColorModels.CustomLinear
hi
i m adding below code but not work
Color ChartColors =
ChartColors =
Color() {Color.Orange, Color.DarkGreen, Color.DeepPink, Color.DarkGray, Color.Red, Color.Yellow, Color.Bisque, Color.Fuchsia, Color.DarkGoldenrod, Color.DarkKhaki, Color.Gold, Color.DarkRed, Color.BurlyWood, Color.CadetBlue, Color.DarkOrchid, Color.AliceBlue, Color.Chartreuse, Color.Chocolate, Color.DarkMagenta, Color.CornflowerBlue, Color.DarkSalmon, Color.DarkTurquoise, Color.DarkMagenta, Color.DarkOliveGreen, Color.DarkOrange, Color.Chartreuse, Color.DarkOrchid, Color.DarkSalmon, Color.DarkSeaGreen, Color.DeepSkyBlue, Color.Firebrick, Color.Blue, Color.Green, Color.Indigo}
.UltraChart1.ColorModel.CustomPalette = ChartColors
.UltraChart1.ColorModel.ModelStyle = ColorModels.CustomLinear
already written a code, same code not work at my side
Please provide details on the following:1. What behavior you are getting (screenshot will be helpful)2. What behavior you expect (screenshot will be helpful)3. What version of webchart you're using. Including a project zip file will also help.
Private Sub chart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
chart.Click
DataTable
"Series Labels", GetType(String
"Column A", GetType(Integer
"Column B", GetType(Integer
'myColumn.Columns.Add("Column C", GetType(Integer))
'myColumn.Columns.Add("Column D", GetType(Integer))
' Add the rows of data
myColumn.Rows.Add(
New [Object]() {"aaaaaaaaaaa"
, 3, 2})
'myColumn.Rows.Add(New [Object]() {"ffffffffff", 3, 2})
Dim ChartColors() As
Color
New
Me
UltraChart1.ChartType = ChartType.PieChart
UltraChart1.PieChart.Labels.Format = PieLabelFormat.ItemLabel
UltraChart1.SaveTo(
"c:\image.png"
, System.Drawing.Imaging.ImageFormat.Png)
Dim r As XDW.Documents.Report.Report = New
XDW.Documents.Report.Report()
"C:\report.pdf"
End
This issue has been fixed in the most recent service release. You can find more information on the service release and a download link here:https://www.infragistics.com/community/blogs/b/vince_mcdonald/posts/service-release-published-netadvantage-windows-forms-and-asp-net-june-25-2009
After upgrading to the newer build you shouldn't experience the issue.
thx max