Skip to content

mixed charts / dataset types do not work #4587

Closed
@benmccann

Description

@benmccann

There are three problems:

  1. scatter doesn't work with a mixed chart type. The reason is because controllers.scatter needs to have showLines: false. However, this only gets applied if chart.type: 'scatter'. scatter and linear should be able to have their own controller options instead of both fighting for the same global options. If chart.data.datasets[0].type = 'scatter' the scatter defaults don't get taken into consideration.

  2. You can't use a bar with a mixed chart type unless you manually set categoryPercentage and barPercentage. categoryPercentage and barPercentage shouldn't be set on the scale because they're options for the bar chart and are not options for the scale. The code currently only sets these values on the category scale which means you can't use a bar chart with other scales that it would be compatible with such as the time scale. These options be set on the dataset and we should have a default value there. This would also allow you to plot multiple bar datasets with differing categoryPercentage and barPercentage values

  3. horizontalBar charts cannot be combined with any other chart type because no other chart supports being horizontal as reported in [FEATURE] Horizontal bar chart in combination with a line chart #4047 & Horizontal Bars mix with lines #4096. The other controllers should be made aware of indexScale and valueScale concepts. For steps towards a solution, see Return correct label for value type axis #5920 and Replace tooltip item xLabel and yLabel with label and value #5996

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions