Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
310
Composite Line and Column chart
posted

Is there a way where i can:

  • Increase the dot sizes on the line graph?
  • Center the Dot so it is centered over the column?

Thanks

Parents
No Data
Reply
  • 28496
    Suggested Answer
    Offline posted

    LineChartAppearance lineApp = this.ultraChart1.CompositeChart.ChartLayers[1].ChartTypeAppearance as LineChartAppearance;
    lineApp.LineAppearances.Add(new LineAppearance());
    lineApp.LineAppearances[1].IconAppearance.Icon = SymbolIcon.Circle;
    lineApp.LineAppearances[1].IconAppearance.IconSize = SymbolIconSize.Large;

    that should answer your first question.  as for the second one ... you can either use the axis Margins for the x-axis of the line chart, or you can handle the FillSceneGraph event, find your Polyline, loop through its datapoints, and re-map them using the x-axis.  that would look something like this...

    ChartLayer columnLayer = this.ultraChart1.CompositeChart.ChartLayers[0].ChartLayer;
                Axis xAxis = columnLayer.Grid["X"] as Axis;
                foreach (Primitive p in e.SceneGraph)
                {
                    Polyline pL = p as Polyline;
                    if (pL != null)
                    {
                        for (int current = 0; current < pL.points.Length; current++)
                        {
                            pL.points[current].point.X = (int)xAxis.Map(current + 0.5);
                        }
                    }
                }

Children