Link to home
Start Free TrialLog in
Avatar of rckrch
rckrchFlag for United States of America

asked on

Mouse move of chart control inside panel control.

I have an asp.net chart control inside an asp.net panel control on a web form.  I am trying to move the chart control in the horizontal direction only while it is in the panel.  I won't to do this because the chart control is wider than the panel control.  I don't want to use scrollbars because I cannot change the appearance of the scrollbars for other browsers like Edge.  Changing the color only works on IE for me.

So, I want to use a mouse move event on the chart control to move the chart horizontally to view the chart areas hidden behind the panel boundaries.  I have researched this and cannot find anything that matches what I am trying to do.

Can anyone help please!?
<asp:Panel ID="Panel7" runat="server" Width="470px" HorizontalAlign="Left"
                                            ScrollBars="None" Height="270px" Direction="RightToLeft" 
                                                CssClass="invisibleOverflow" BorderStyle="None" ><br />
                                                
                                            <asp:Chart ID="ChtCHART2" runat="server" DataSourceID="SqlDataSource2"
                                                Width="400px" BackColor="Black" EnableViewState="True"
                                                BackImageAlignment="TopLeft" BorderSkin-BackHatchStyle="LightHorizontal"
                                                BorderSkin-BackGradientStyle="TopBottom" BorderlineWidth="2" Height="230px">
                                                
                                                <Series>
                                                    <asp:Series ChartType="Line" Name="Series1" XValueMember="Cur_Date"
                                                        XValueType="DateTime" YValueMembers="DataMean" YValueType="Double"
                                                        BorderColor="Silver" BorderWidth="2" Color="#66CCFF" IsXValueIndexed="True"
                                                        YAxisType="Secondary">
                                                        <EmptyPointStyle BackImageTransparentColor="Transparent"
                                                            BackSecondaryColor="Transparent" BorderColor="Transparent"
                                                            BorderDashStyle="NotSet" Color="Transparent" IsVisibleInLegend="False"
                                                            LabelBackColor="Transparent" LabelBorderColor="Transparent"
                                                            LabelBorderDashStyle="NotSet" LabelForeColor="Transparent" />
                                                    </asp:Series>
                                                    <asp:Series ChartType="Line" Name="UCLSeries" XValueMember="Cur_Date"
                                                        XValueType="DateTime" YValueMembers="Cur_UCL" YValueType="Double"
                                                        BorderColor="#CC3300" BorderWidth="3" Color="#CC3300" IsXValueIndexed="True"
                                                        BorderDashStyle="Dash">
                                                        <EmptyPointStyle BackImageTransparentColor="Transparent"
                                                            BackSecondaryColor="Transparent" BorderColor="Transparent"
                                                            BorderDashStyle="NotSet" Color="Transparent" IsVisibleInLegend="False"
                                                            LabelBackColor="Transparent" LabelBorderColor="Transparent"
                                                            LabelBorderDashStyle="NotSet" LabelForeColor="Transparent" />
                                                    </asp:Series>
                                                    <asp:Series ChartType="Line" Name="LCLSeries" XValueMember="Cur_Date"
                                                        XValueType="DateTime" YValueMembers="Cur_LCL" YValueType="Double"
                                                        BorderColor="#CC3300" BorderWidth="3" Color="#CC3300" IsXValueIndexed="True"
                                                        BorderDashStyle="Dash">
                                                        <EmptyPointStyle BackImageTransparentColor="Transparent"
                                                            BackSecondaryColor="Transparent" BorderColor="Transparent"
                                                            BorderDashStyle="NotSet" Color="Transparent" IsVisibleInLegend="False"
                                                            LabelBackColor="Transparent" LabelBorderColor="Transparent"
                                                            LabelBorderDashStyle="NotSet" LabelForeColor="Transparent" />
                                                    </asp:Series>
                                                    <asp:Series ChartType="Line" Name="MeanSeries" XValueMember="Cur_Date"
                                                        XValueType="DateTime" YValueMembers="Cur_Mean" YValueType="Double"
                                                        BorderColor="#666666" BorderWidth="5" Color="#666666" IsXValueIndexed="True"
                                                        BorderDashStyle="Solid">
                                                        <EmptyPointStyle BackImageTransparentColor="Transparent"
                                                            BackSecondaryColor="Transparent" BorderColor="Transparent"
                                                            BorderDashStyle="NotSet" Color="Transparent" IsVisibleInLegend="False"
                                                            LabelBackColor="Transparent" LabelBorderColor="Transparent"
                                                            LabelBorderDashStyle="NotSet" LabelForeColor="Transparent" />
                                                    </asp:Series>
                                                </Series>
                                                <ChartAreas>
                                                    <asp:ChartArea Name="ChartArea1" BackColor="Transparent"
                                                        BackSecondaryColor="Silver" BorderColor="Gray" BorderWidth="0"
                                                        ShadowColor="Transparent" AlignmentOrientation="Horizontal" BorderDashStyle="Solid">
                                                        <InnerPlotPosition Auto="False" Width="100" Height="95" Y="2" />
                                                        <Position Auto="False" Height="90" Width="100" />
                                                        <AxisY2 IsLabelAutoFit="True" LineColor="Gray" LineWidth="2"
                                                            Title="Units" TitleFont="Microsoft Sans Serif, 8pt, style=Bold"
                                                            TitleForeColor="#66CCFF" IntervalAutoMode="VariableCount" Crossing="Min"
                                                            TitleAlignment="Far" IntervalType="Auto">
                                                            <MajorGrid LineColor="#333333" Enabled="True" Interval="Auto" 
                                                                IntervalType="Auto" IntervalOffset="Auto" IntervalOffsetType="Auto" />
                                                            <LabelStyle ForeColor="#66CCFF" />
                                                        </AxisY2>
                                                        <AxisX IsLabelAutoFit="True" LineColor="Gray" LineWidth="2" Title="Date/Time"
                                                            TitleFont="Microsoft Sans Serif, 8pt, style=Bold" TitleForeColor="#66CCFF"
                                                            LabelAutoFitMinFontSize="8" IntervalType="Auto"
                                                            LabelAutoFitStyle="DecreaseFont"
                                                            IntervalAutoMode="VariableCount" Interval="Auto" IsReversed="True"  
                                                            IntervalOffsetType="Auto">
                                                            <MajorGrid Enabled="true" LineColor="#333333" />
                                                            <LabelStyle ForeColor="#66CCFF" />
                                                        </AxisX>
                                                    </asp:ChartArea>
                                                </ChartAreas>
                                                <Titles>
                                                    
                                                </Titles>
                                            </asp:Chart>
</asp:Panel>
                                                    

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of David Favor
David Favor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rckrch

ASKER

Thanks