/// <summary>
        /// Generates specific logarithmic labels for axis.
        /// </summary>
        /// <param name="g">Graphics3D object</param>
        /// <param name="ax">Axis</param>
        /// <param name="majorlabels">array of logarithmic axis labels</param>
        /// <param name="minorticks">array of minor ticks</param>
        /// <param name="start">left/lower bound for minor tick</param>
        /// <param name="end">right/upper bound for minor tick</param>
        private void GenerateLogLabels(Steema.TeeChart.Drawing.Graphics3D g, Steema.TeeChart.Axis ax, double [] majorlabels, double [] minorticks, int start, int end)
        {
            ax.Labels.Items.Clear();
            int    mindecade = GetDecade(ax.Minimum);
            int    maxdecade = GetDecade(ax.Maximum);
            double currval;
            int    tickypos;

            start -= ax.MinorTicks.Length;
            end   += ax.MinorTicks.Length;

            g.Pen.Style = ax.MinorGrid.Style;
            g.Pen.Color = ax.MinorGrid.Color;

            for (int i = mindecade; i <= maxdecade; i++)
            {
                for (int j = 0; j < majorlabels.Length; j++)
                {
                    currval = majorlabels[j] * Math.Pow(10, i);
                    if (currval >= ax.Minimum && currval <= ax.Maximum)
                    {
                        ax.Labels.Items.Add(currval);
                    }
                }
                for (int k = 0; k < minorticks.Length; k++)
                {
                    currval = minorticks[k] * Math.Pow(10, i);
                    if (currval >= ax.Minimum && currval <= ax.Maximum)
                    {
                        tickypos = ax.CalcPosValue(currval);
                        if (ax.Horizontal)
                        {
                            g.Line(tickypos, start, tickypos, end);
                        }
                        else
                        {
                            g.Line(start, tickypos, end, tickypos);
                        }
                    }
                }
            }
        }
コード例 #2
0
        private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
        {
            if (idx != -1)
            {
                string tmpStr = tagCloud1.Labels[idx].ToString();

                int fontSize = (int)(tagCloud1.GetTagFontSize(idx) * 1.5);

                g.Pen.Width = 2;
                g.Pen.Color = tagCloud1.ValueColor(idx);
                g.Line(new Point(tagCloud1.Positions[idx].Left, tagCloud1.Positions[idx].Top + fontSize),
                       new Point(tagCloud1.Positions[idx].Right, tagCloud1.Positions[idx].Top + fontSize));
            }
        }