3 Answers, 1 is accepted
0
Hi Nicky,
RadChart for WinForms does not support exporting to PDF. However you can save the chart into an image:
and then add your image to whatever document you want.
All the best,
Peshito
the Telerik team
RadChart for WinForms does not support exporting to PDF. However you can save the chart into an image:
radChart1.Save(
"chart.png"
, ImageFormat.Png);
All the best,
Peshito
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
0
Nicky
Top achievements
Rank 1
answered on 25 May 2012, 06:55 PM
Thank You!
Do you know how to refresh the RadChart for winforms?
Do you know how to refresh the RadChart for winforms?
0
Hello Nicky,
Simply try calling the DataBind() method.
Below is a sample code demonstrating the approach:
Hope this helps.
Kind regards,
Peshito
the Telerik team
Simply try calling the DataBind() method.
Below is a sample code demonstrating the approach:
public
partial
class
Form1 : Form
{
private
DataTable table;
public
Form1()
{
InitializeComponent();
table = GetTable();
ChartSeries series =
new
ChartSeries();
series.Type = ChartSeriesType.Pie;
series.DataYColumn =
"Value"
;
series.Name =
"1st Series Name"
;
//series.DataLabelsColumn = "Title";
series.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.ItemLabels;
radChart1.AutoLayout =
true
;
radChart1.Series.Add(series);
radChart1.Legend.Appearance.Visible =
false
;
radChart1.DataSource = table;
radChart1.DataBind();
}
public
static
DataTable GetTable()
{
DataTable table =
new
DataTable();
table.Columns.Add(
"Value"
,
typeof
(
int
));
table.Columns.Add(
"Title"
,
typeof
(
string
));
table.Rows.Add(65,
"Text1"
);
table.Rows.Add(20,
"Text2"
);
table.Rows.Add(5,
"Text3"
);
table.Rows.Add(10,
"Text4"
);
table.Rows.Add(15,
"Text5"
);
return
table;
}
private
void
button1_Click(
object
sender, EventArgs e)
{
int
value = (
int
)
this
.table.Rows[0][0];
value += 100;
this
.table.Rows[0][0] = value;
this
.radChart1.DataBind();
}
}
Hope this helps.
Kind regards,
Peshito
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>