Note that there are some explanatory texts on larger screens.

plurals
  1. POHighcharts using Datatable in Asp.Net
    primarykey
    data
    text
    <p>Actually,I'm using <code>PieChart</code> of <code>HighCharts</code> to display my data.<br> The data is Getting binded but the <code>Tooltips</code> are not displaying correctly.<br> When I'm binding the same data to <code>LineChart</code>,It is displaying perfectly.But when comes to <code>PieChart</code>,this problem comes. and even the data is displaying as <code>Slices</code> like Below :</p> <p><img src="https://i.stack.imgur.com/U5Wo2.png" alt="enter image description here"></p> <p>My Code goes like this :</p> <pre><code>&lt;highchart:PieChart ID="chart1" Width="500" Height="500" runat="server" /&gt; SqlDataAdapter da = new SqlDataAdapter("select * from SURVEY_ORG where USERS&lt;&gt;0", con); DataSet ds = new DataSet(); da.Fill(ds); chart1.PlotOptions = new Highchart.Core.PlotOptions.PlotOptionsPie { allowPointSelect = true, cursor = "pointer", dataLabels = new Highchart.Core.PlotOptions.DataLabels { enabled = true } }; PointCollection pc = new PointCollection(); for (int i = 0; i &lt; ds.Tables[0].Rows.Count; i++) { pc.Add(new Point(ds.Tables[0].Rows[i]["ORG_NAME"], Convert.ToInt64(ds.Tables[0].Rows[i]["USERS"]))); } var series = new Collection&lt;Serie&gt;(); series.Add(new Serie() { data = pc.ToArray() }); chart1.PlotOptions = new Highchart.Core.PlotOptions.PlotOptionsPie { allowPointSelect = true, cursor = "Pointer", showInLegend = true, dataLabels = new Highchart.Core.PlotOptions.DataLabels { enabled = true } }; chart1.Tooltip = new ToolTip { formatter = "function() { return '&lt;b&gt;'+ this.point.name +'&lt;/b&gt;: '+ this.percentage.toFixed(2) +' %'; }" }; chart1.Title = new Highchart.Core.Title("Custom Title"); chart1.PlotOptions.shadow = false; chart1.DataSource = series; chart1.DataBind() </code></pre> <p>I want to Display "ORG_NAME" in <code>Legends</code> and in the place of <code>slice</code></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload