Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8982925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:42:05+00:00 2026-06-15T20:42:05+00:00

I m using dotnetHightcharts BasicColumnChart public static Highcharts BasicColumnChart(Series[] Series, string[] Categories, string Title

  • 0

I m using dotnetHightcharts

BasicColumnChart

public static Highcharts BasicColumnChart(Series[] Series, string[] Categories, string Title = "", string SubTitle = "", string XAxisTitle = "", string YAxisTitle = "", string ToolTipFormat = "", string YAxisLabel = "")
{
    Highcharts chart = new Highcharts("chart")
        .InitChart(new Chart { DefaultSeriesType = ChartTypes.Column, Height = 300 })
        .SetTitle(new Title { Text = Title })
        .SetSubtitle(new Subtitle { Text = SubTitle })
        .SetXAxis(new XAxis { Categories = Categories })
        .SetYAxis(new YAxis
        {
            Min = 0,
            Title = new YAxisTitle { Text = YAxisTitle },
            Labels = new YAxisLabels
            {
                 Formatter = @"function() { return this.value +' " + YAxisLabel + "';}"
            }
        })
        .SetLegend(new Legend
        {
            Layout = Layouts.Vertical,
            VerticalAlign = VerticalAligns.Top,
            Align = HorizontalAligns.Right,
            Shadow = true,
            BackgroundColor = ColorTranslator.FromHtml("#FFFFFF"),
            Floating = true
        })
        .SetTooltip(new Tooltip { Formatter = @"function() { return ''+ this.x +' - '+ this.y +' " + ToolTipFormat + "'; }" })
        .SetPlotOptions(new PlotOptions
        {
            Column = new PlotOptionsColumn
            {
                PointPadding = 0.2,
                BorderWidth = 0
            }
        })
        .SetSeries(Series);

    return chart;
}

I can set same tooltipFormat for every series with following line:

.SetTooltip(new Tooltip { Formatter = @"function() { return ''+ this.x +' - '+ this.y +' " + ToolTipFormat + "'; }" })

Above code output : date - value tooltipFormat

But I want to show different format for each series. Why do I want this, Because I want to show different data that has different unit, for example:

value[0] = 220 V    //Volt
value[1] = 5 A      //Ampere
...
value[15] = 1200 kW //Kilowatt

there are a lot of example about this topic but, these examples only change text. My data views like this:

NAME     VALUE    UNIT

Volt     220      V
Ampere     5      A
....

I want to change tooltipFormat for each series dynamicly. I want to add UNIT field dynamicly. How can I do this?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:42:06+00:00Added an answer on June 15, 2026 at 8:42 pm

    You can add custom attribute in series object:

    series:{name:'series1',unit:'%'}
    

    and can access it in tooltip formatter function:

    this.series.options.unit
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using import datetime in python, is it possible to take a formatted time/date string
Using linq2sql I'm trying to take the string in txtOilChange and update the oilChange
Using the HTML5 File API I can get the Binary String representation of a
I'm using HighCharts to display charts on my site. What I'd like to achieve
Using server-side C#, how can I convert a querystring to a JSON string of
Using string functions and a whole lot of if-else turns this into a real
Using a CSS image sprite, I'm creating an 'interactive' image where hovering over certain
Using a populated Table Type as the source for a TSQL-Merge. I want to
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using SQL Server 2008 R2 we are looking for a way to select the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.