Initially empty chart

Thread is closed for posting
3 posts, 1 answers
  1. Brett Robichaud
    Brett Robichaud avatar
    24 posts
    Member since:
    Feb 2009

    Posted 10 Apr 2009 Link to this post

    I have a page with a form for options to create a chart and the chart itself on the same page. The user chooses options then clicks Generate to fill in the chart. So my problem is that when the page first renders I have it setyo to hide the chart. Then on the Generate I make it visible. The problem with the invisible approach is the LoadingPanel doesn't show up because the chart is hidden.

    So I am thinking of showing the chart on first render but I need it to look nice and not show the ugly "there is no or empty series" tag in the middle, as well as showing "Chart Title" and a couple of Series names in the legend.

    Is there any way to show a clean placeholder for the chart so I can utilize the loading panel when my Generate button is pressed?
  2. Answer
    Ves
    Admin
    Ves avatar
    2927 posts

    Posted 13 Apr 2009 Link to this post

    Hi Brett,

    It is just a matter of appearance configuration. Here is an example of an empty RadChart:

    <telerik:RadChart ID="RadChart1" runat="server"
            <Legend Visible="false"></Legend> 
            <ChartTitle Visible="false"
            </ChartTitle> 
            <PlotArea> 
                <Appearance Border-Visible="false"
                    <FillStyle MainColor="White" FillType="Solid"
                    </FillStyle> 
                    <Border Visible="False"></Border> 
                </Appearance> 
                <EmptySeriesMessage> 
                    <TextBlock Text=""
                    </TextBlock> 
                </EmptySeriesMessage> 
            </PlotArea> 
        </telerik:RadChart> 


    Alternatively, you can wrap the chart in a regular asp:Panel control and add an ajax setting for this panel. This will allow you to toggle the chart visibility, a similar case is described here.

    Hope this helps.

    Regards,
    Ves
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  3. Brett Robichaud
    Brett Robichaud avatar
    24 posts
    Member since:
    Feb 2009

    Posted 13 Apr 2009 Link to this post

    Ah, the panel idea is just what I was looking for. I didn't realize I could use non ajax controls as the target for a loading panel.

    Thanks!
Back to Top