Hi,
I have a chart -
Which displays fine on first databind, but on rebinding with new data on this button press the old chart stays on screen?
What am i doing wrong?
Thanks
Matt
I have a chart -
| <telerik:RadChart ID="RadChart1" runat="server" ChartImageFormat="Jpeg" Height="500px" |
| Width="1400px" DefaultType="Line" Skin="Office2007"> |
| <Series> |
| <telerik:ChartSeries DataXColumn="OAdate" DataYColumn="nosearches" Name="User Visits" |
| Appearance-LineSeriesAppearance-Width="2" Type="Line"> |
| <Appearance> |
| <FillStyle FillType="Solid" MainColor="69, 115, 167"> |
| </FillStyle> |
| <TextAppearance TextProperties-Color="Black"> |
| </TextAppearance> |
| <Border Color="69, 115, 167" /> |
| </Appearance> |
| </telerik:ChartSeries> |
| <%-- <telerik:ChartSeries DataXColumn="OAdate" DataYColumn="errorscount" Name="Errors" |
| Appearance-LineSeriesAppearance-Width="10" Type="Line"> |
| <Appearance> |
| <LineSeriesAppearance Width="1" /> |
| <FillStyle MainColor="Black" /> |
| </Appearance> |
| </telerik:ChartSeries> |
| --%> |
| </Series> |
| <PlotArea> |
| <XAxis AutoScale="true" IsZeroBased="false"> |
| <Appearance ValueFormat="ShortDate" CustomFormat="" Color="134, 134, 134" MajorTick-Color="134, 134, 134"> |
| <MajorGridLines Color="134, 134, 134" Width="0" /> |
| <TextAppearance TextProperties-Color="Black"> |
| </TextAppearance> |
| </Appearance> |
| <AxisLabel> |
| <TextBlock> |
| <Appearance TextProperties-Color="Black"> |
| </Appearance> |
| </TextBlock> |
| </AxisLabel> |
| </XAxis> |
| <YAxis> |
| <Appearance Color="134, 134, 134" MajorTick-Color="134, 134, 134" MinorTick-Color="134, 134, 134"> |
| <MajorGridLines Color="134, 134, 134" /> |
| <MinorGridLines Color="134, 134, 134" /> |
| <TextAppearance TextProperties-Color="Black"> |
| </TextAppearance> |
| </Appearance> |
| <AxisLabel> |
| <TextBlock> |
| <Appearance TextProperties-Color="Black"> |
| </Appearance> |
| </TextBlock> |
| </AxisLabel> |
| </YAxis> |
| <Appearance Dimensions-Margins="5%, 5%, 5%, 5%"> |
| <FillStyle FillType="Solid" MainColor=""> |
| </FillStyle> |
| </Appearance> |
| </PlotArea> |
| <Appearance> |
| <Border Color="134, 134, 134" /> |
| </Appearance> |
| <ChartTitle> |
| <Appearance> |
| <FillStyle MainColor=""> |
| </FillStyle> |
| </Appearance> |
| <TextBlock> |
| <Appearance TextProperties-Color="Black" TextProperties-Font="Arial, 18px"> |
| </Appearance> |
| </TextBlock> |
| </ChartTitle> |
| <Legend> |
| <Appearance Dimensions-Margins="15%, 2%, 1px, 1px" Dimensions-Paddings="2px, 8px, 6px, 3px"> |
| <ItemTextAppearance TextProperties-Color="Black"> |
| </ItemTextAppearance> |
| <ItemMarkerAppearance Figure="Square"> |
| </ItemMarkerAppearance> |
| </Appearance> |
| </Legend> |
| </telerik:RadChart> |
Which displays fine on first databind, but on rebinding with new data on this button press the old chart stays on screen?
| protected void searchButton_Click(object sender, EventArgs e) |
| { |
| Report report = new Report(); |
| RadChart1.DataSource = report.RetrieveSSPhraseDailysp(keyword, 99, 1, fromRadDatePicker.SelectedDate, toRadDatePicker.SelectedDate); |
| RadChart1.DataBind(); |
| phraseGridView.Rebind(); |
| } |
What am i doing wrong?
Thanks
Matt