Flexchart white-background 2.5.20173.241

Posted by: marcin.chojka on 1 July 2019, 11:27 pm EST

  • Posted 1 July 2019, 11:27 pm EST

    Hello,

    I'm totally newbie here so please, be gentle for me.
    Recently i worked on Xamarin App and used flexchart.
    In the previous versions the background of chart worked just fine, but recently background has changed to white.

    I managed to change plot area colour but there still remains this white frame around and I don't know which element i should refer to.

    I attatched a picture and a fragment of code for a better visualization.


    <chart:FlexChart Grid.Row="3" Margin="5,0,0,0" x:Name="chart"
    ItemsSource="{Binding ChartData}" BindingX="Name" ChartType="Column" CascadeInputTransparent="False">
    <chart:FlexChart.Series>
    <chart:ChartSeries Binding="Value" Visibility="Plot" >
    <chart:ChartSeries.Style>
    <chart:ChartStyle Fill="{StaticResource GeneralRed}" StrokeThickness="0" />
    </chart:ChartSeries.Style>
    </chart:ChartSeries>
    </chart:FlexChart.Series>
    <chart:FlexChart.AxisY>
    <chart:ChartAxis MajorGrid="true" Format="#" AxisLine="true" Max="{Binding Path=YMax, Mode=TwoWay}">
    <chart:ChartAxis.MajorGridStyle>
    <chart:ChartStyle Fill="White" Stroke="White"/>
    </chart:ChartAxis.MajorGridStyle>
    <chart:ChartAxis.MinorGridStyle>
    <chart:ChartStyle Fill="White" Stroke="White" />
    </chart:ChartAxis.MinorGridStyle>
    <chart:ChartAxis.Style>
    <chart:ChartStyle Fill="White" Stroke="White" />
    </chart:ChartAxis.Style>
    </chart:ChartAxis>
    </chart:FlexChart.AxisY>
    <chart:FlexChart.AxisX>
    <chart:ChartAxis AxisLine="true" MajorGrid="false">
    <chart:ChartAxis.MinorGridStyle>
    <chart:ChartStyle Fill="White" Stroke="White" />
    </chart:ChartAxis.MinorGridStyle>
    <chart:ChartAxis.Style>
    <chart:ChartStyle Fill="White" Stroke="White" />
    </chart:ChartAxis.Style>
    </chart:ChartAxis>
    </chart:FlexChart.AxisX>
    <chart:FlexChart.PlotStyle>
    <chart:ChartStyle Fill="{StaticResource BackgroundColor}"/>
    </chart:FlexChart.PlotStyle>
    <BoxView BackgroundColor="{StaticResource BackgroundColor}"/>
    </chart:FlexChart>




    Kind regards
  • Marked as Answer

    Replied 3 July 2019, 5:32 pm EST

    Hi Marcin

    Chart has a "BackgroundColor" property of which sets the background of the FlexChart and covers the complete backgruound of the FlexChart. Plot area will only set the background to the part of the chart where data points get rendered(Area within axes).

    For reference please see the attached sample.

    Please let us know if you need any other help.

    Thanks

    Prj_FlexChart.zip
  • Replied 4 July 2019, 12:55 am EST

    Hello, thank you for your help.
    Actually, your solution was the first I tried, but it didn't work.
    It was proper solution, but I made some mistakes... My controls were obsolete and this parameter was irresponsible. This whole situation was caused by me while switching branches...

    Thank you very much for your time and your help.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels